What is the Purpose of C# constructor extern modifier?
I know about usage of extern METHODS to invoke Win32 functions, but what about CONSTRUCTORS?
Please give t
I believe one use/purpose of an extern ctor is to have the constructor implemented within the CLR itself. if you disassemble mscorlib.dll using Reflector and look at the System.String type, you'll see:
[MethodImpl(MethodImplOptions.InternalCall)]
public extern String(char[] value);
Which basically tells us that the (char[]) ctor for the string class is externally implemented, as part of the .net runtime.