Difference between array<T> and array<T^> where T is ValueType
问题 I'm writing a C++/CLI wrapper over native lib for my C# project. I'm trying to convert std::vector<unsigned char> in native c++ to System.Byte[] in C#. In C++/CLI both variants are valid auto arr = gcnew array<System::Byte>(10); auto arr = gcnew array<System::Byte^>(10); But in first case in C# code we got System::Byte[] type whereas in second case we got System::ValueType[]. So my question is why we got such strange behavior? 回答1: The ^ hat should only be used on reference types. Byte is a