c++ cli - Convert Object to Array C++/CLi -


i using vs2010, windows forms application(c++)

array<int>^ myarray = gcnew array<int>(10){1,2,3,4,5,6,7,8,9,10}; object^ myobj = myarray; 

but when try myobj->length error.

u may ask why need object? answer is, main goal create dictionary put type value in , able access read, edit etc.

dictionary<string^, object^>^ mydic = gcnew dictionary<string^, object^>;     array<int>^ myarray = gcnew array<int>(10){1,2,3,4,5,6,7,8,9,10};     mydic["arrayindictionary"] = myarray;     mydic["arrayindictionary"]->length; 


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -