What's the difference between normal types and anonymous types in C# regarding memory management at runtime? Are anonymous types more inefficient in some way than normal types?
Anonymous types are neither more nor less than generic internal classes with a constructor, readonly fields, and an implementation of GetHashCode
and ToString
. There's nothing special about them as far as the runtime is concerned. The runtime does not know that they are "anonymous"; the runtime sees them as just another class. The generated code is nothing interesting.
What's the difference between normal types and anonymous types in C#, regarding to compilation process?
I have no idea what this question means to ask.