This following works fine:
public value struct Foo {
Platform::String^ Name;
Platform::String^ Type;
};
However, when I tried to add an Platform::Array<double>^
as the following, I will get an error message.
public value struct Foo {
Platform::String^ Name;
Platform::String^ Type;
const Platform::Array<double>^ Value;
};
Error message:
signature of public member contains invalid type 'const Platform::Array<double,1> ^
I also tried this const Platform::Array<Platform::String^>^ Values
. But I will have similar error message:
signature of public member contains invalid type 'const Platform::Array<Platform::String ^,1> ^'
What does this mean? And how do I fix this?
Edit: Have to use class
in this case since value struct
can contain as fields only fundamental numeric types, enum classes, or Platform::String^
.
public ref class Foo sealed {
property Platform::String^ Name;
property Platform::String^ Type;
property Platform::Array<Platform::String^>^ Values;
};