我试图从中获得价值
IKeyValuePair<Platform::Guid,Platform:: Object>
比如说我有 Api Called SomeApi() 它返回IKeyValuePair<Platform::Guid,Platform:: Object>
C++ 代码:
auto res = SomeApi();
String ^str = res->key; // I am able to get Guid Here
现在如何从中获得价值
res->value
返回对象,但如何知道对象的类型并从中获取值。
如果我做
String^ value = res->value.ToString(); // this returns something else not value
请通过代码向我解释我如何从中获得价值IKeyValuePair
。