I believe (correct me if i am wrong), according to the C# rule for value types, there is no default constructor. The CLR will define the one for zeroing out the field values.
For reference type :
class Test
{
private string Name;
}
Will the default constructor be supplied by C# or the CLR?
In the CLI specification, a constructor is mandatory for non-static classes, so at least a default constructor will be generated by the compiler if you don't specify another constructor.
So the default constructor will be supplied by the C# Compiler for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With