0
我正在將一箇舊遊戲移植到Windows 10商店應用程序。 我可以寫,然後讀字符串應用程序設置:如何將整數序列化到ApplicationDataContainer
ApplicationDataContainer^ localSettings = ApplicationData::Current->LocalSettings;
localSettings->Values->Insert("keyS", "hello");
String^ valueS = safe_cast<String^>(localSettings->Values->Lookup("keyS"));
我也可以把int
值:
localSettings->Values->Insert("keyI", 123);
但是我怎麼看它?
??? valueI = safe_cast<???>(localSettings->Values->Lookup("keyI"));
Lookup
回報Platform::Object^
,所以我怎麼將其轉換爲int
?