TC#C# is a (memory) managed languagedlanguage, so it works primarily with references; this isreferences, not at all like unmanaged languages as are for example used for GPU shader languages. In your example, we have a reference to an array (which is 4-8 bytes) stored inside MyNode. In this way, the compiler can calculate the sizeof your struct accordingly, even though the array itself is of a variable size, it is stored in another piece of memory, not inside the struct -- again, only a reference to the array is stored inside the struct.