I have a dictionary myResult:
Dictionary<String^,array< Byte >^>^ myResult = gcnew Dictionary<String^,array< Byte >^>();
I am declaring
array <Byte^>^ a;
and then I am adding a to a key of the dictionary
myResult->Add("OVERVIEW",a);
I am getting an error
error C2664: 'System::Collections::Generic::Dictionary<TKey,TValue>::Add' :
cannot convert parameter 2 from 'cli::array<Type> ^' to 'cli::array<Type> ^'
1> with
1> [
1> TKey=System::String ^,
1> TValue=cli::array<unsigned char> ^
1> ]
1> and
1> [
1> Type=System::Byte ^
1> ]
1> and
1> [
1> Type=unsigned char
1> ]
Any help is appreciated since I am still not very familiar with c++/cli;
Byte^andbyte^name different types (actually, I am somewhat surprised that the latter compiles, though I am not a C++/CLI expert). The former is a tracking handle to aSystem::Byte. The latter is anunsigned char(apparently the compiler is dropping the hat, I presume it does so because it is not a CLI type, making it ineligible to wear hats).