Okay. "String" was a custom type. I didn't want to port it. So I used the .NET pendant "String" in "class Constant". This forces me to make the "class Constant" a managed type (using "ref") because an unmanaged class can't contain managed members. After this, the compiler complains that no native arrays can be created of an managed type.
How can this be solved? On the one hand I want to create an global const array of a class type, and on the other hand I want to use no other string classes than String and StringBuilder. How can I solve this in a .NET and managed-C++ friendly manner?
A few things are worth noting: A value class is used for defining Constant since ref classes don’t qualify as aggregate types. Value classes are also more efficiently stored and accessed in memory and are stored continuously in the managed array. An abstract sealed class is used to house the static array since managed types cannot be global variables.