I have another C ++ managed question KeyValuePair where I know what to do in C #, but it's hard for me to switch to managed C ++. Here is the code that does what I want to do in C #:
KeyValuePair<String, String> KVP = new KeyValuePair<string, string>("this", "that");
I reflected this in MC ++ and get the following:
KeyValuePair<String __gc*, String __gc*> __gc* KVP = (S"this", S"that");
which I translated into:
KeyValuePair<String ^, String ^> KVP = (gcnew String("this"), gcnew String("that"));
I know from my previous question that KeyValuePair is a value type; The problem is that it is a value type in C ++ and a reference type in C #? Can someone tell me how to set KeyValuePair key and value from C ++?
brian source share