D
....DotNet4Ever....
I don't know about the internals of .net code generation, quite frankly the
very last time I bothered to look at generated code was some 15 years ago
when I worked with embedded systems.
Now I have been wondering about .NET enumeration items and the space that it
is allocated in memory for them. For example, if I create this enum:
enum TestEnum
{
One = 10000,
Two,
Hundred = 10100
}
does it allocate three (3) items, or does it allocate a memory block with
10,100 items of which only three are actually used? In other words, is it a
look up table or an indexed table?
very last time I bothered to look at generated code was some 15 years ago
when I worked with embedded systems.
Now I have been wondering about .NET enumeration items and the space that it
is allocated in memory for them. For example, if I create this enum:
enum TestEnum
{
One = 10000,
Two,
Hundred = 10100
}
does it allocate three (3) items, or does it allocate a memory block with
10,100 items of which only three are actually used? In other words, is it a
look up table or an indexed table?