In C# we can do something like this:
Int32 i = new Int32();
However the following will return null
:
typeof(Int32).GetConstructor(new Type[0])
Why is this?
I checked the documentation and got no clues as to why this happens.
My results can be illustrated in the following piece of code:
using System;
public class Program
{
public static void Main()
{
Int32 i = new Int32();
Console.WriteLine(i);
Console.WriteLine(typeof(Int32).GetConstructor(new Type[0]) == null);
}
}
The output is :
0
True