C# - How can I make sure all my structures are initialized??
I am writing an application in C# which is going to do extensive calculations. Everything is going around basic struct - Value. It is basically double with some additional parameters (accuracy etc.)
It has to be a struct, because there will be too many of them created to afford heap allocation.
Now, I need to make sure they all are correctly initialized.
I cannot declare default explicit constructor, though I am provided default constructor,  which initializes everything with 0, which does not make sense in my domain.

And there is no way to deny creating an instance without calling my constructor with parameters either...?

Basically what I need is this test to pass:

    [Test]
    public void HowDoesThisStructureInitializeByDefault()
    {
       Value v = new Value();
    
       Assert.AreEqual(0, v.Val); - passes
       Assert.AreEqual(-1, v.Accuracy); - fails
    }

It would be OK to throw an exception if no constructor has been explicitly called and structure is still accessed, but checking that all the time would take too much time.

I am almost losing hope now, please help!
C# - How can I make sure all my structures are initialized??
===

I am writing an application in C# which is going to do extensive calculations. Everything is going around basic struct - Value. It is basically double with some additional parameters (accuracy etc.)
It has to be a struct, because there will be too many of them created to afford heap allocation.
Now, I need to make sure they all are correctly initialized.
I cannot declare default explicit constructor, though I am provided default constructor,  which initializes everything with 0, which does not make sense in my domain.

And there is no way to deny creating an instance without calling my constructor with parameters either...?

Basically what I need is this test to pass:

    [Test]
    public void HowDoesThisStructureInitializeByDefault()
    {
       Value v = new Value();
    
       Assert.AreEqual(0, v.Val); - passes
       Assert.AreEqual(-1, v.Accuracy); - fails
    }

It would be OK to throw an exception if no constructor has been explicitly called and structure is still accessed, but checking that all the time would take too much time.

I am almost losing hope now, please help!