Why can’t I give a default value as optional parameter except null?
A starting point is that the CLR has no support for this. It must be implemented by the compiler. Something you can see from a little test program: class Program { static void Main(string[] args) { Test(); Test(42); } static void Test(int value = 42) { } } Which decompiles to: .method private hidebysig static … Read more