A
Atmapuri
Hi!
Would the optimizer in C# be able to take advantage of the copy constructor:
http://msdn2.microsoft.com/en-us/library/ms173116.aspx
written by the programmer, when copying structs? The copy constructor
can namely copy less in a more efficient way. Example (continuing from
the source above), if the Person type would be struct with copy constructor
would that copy constructor be called in situation like this:
person a2 = new person();
person a = a2;
This is not applicable to classes, but makes every sense with struct
types, which require that constructor is called to initialize them also.
Thanks!
Atmapuri
Would the optimizer in C# be able to take advantage of the copy constructor:
http://msdn2.microsoft.com/en-us/library/ms173116.aspx
written by the programmer, when copying structs? The copy constructor
can namely copy less in a more efficient way. Example (continuing from
the source above), if the Person type would be struct with copy constructor
would that copy constructor be called in situation like this:
person a2 = new person();
person a = a2;
This is not applicable to classes, but makes every sense with struct
types, which require that constructor is called to initialize them also.
Thanks!
Atmapuri