如何以编程方式在Windows 10 Mobile上读/写注册表项?

时间:2016-02-24 19:30:16

标签: windows-10-mobile

如何以编程方式在Windows 10 Mobile上读取/写入注册表项?

1 个答案:

答案 0 :(得分:-1)

在UWP上使用LocalSettings代替注册表项,例如:

Windows.Storage.ApplicationDataContainer localSettings = 
Windows.Storage.ApplicationData.Current.LocalSettings;

localSettings.Values["exampleSetting"] = "Hello Windows";

Object value = localSettings.Values["exampleSetting"];

有关详细信息,请参阅以下链接:

https://msdn.microsoft.com/en-us/windows/uwp/app-settings/store-and-retrieve-app-data https://msdn.microsoft.com/library/windows/apps/br241622