 I've been researching the .NET Common Intermediate Language (CIL) lately, and I noticed a few funny things in how C# exports array initializers. If you use a primitive type, such as Int32, Int64, Byte, SByte, and so on, instead of creating a new array and initializing each element individually, it merely creates a new array and pushes a RuntimeFieldHandle of a static field stored privately. Now to help illustrate, lets use an example, starting with a sample C# Array: Read More
|