I need to read the values of System.Management.PropertyData
when it's an array.
PropertyData.IsArray Property
I have no idea how to convert PropertyData.Value
to something readable.
If I print PropertyData.Value
as it is, I get a "System.String[]"
If I convert it to array<String>
for each(String s in (array<String>^)(object->Properties[propertyName]->Value))
Console::WriteLine(s);
I get a
Error (active) the element type of a cli::array must be a handle or value type
Any help would be appreciated.
This is simply a syntax error.
The correct form is
for each (String^ s in (array<String^>^)...