Reputation: 113
On Windows Phone 8.1, in an C# project, I want to get the device ID via -> DeviceExtendedProperties So I might want to do it like
using Microsoft.Phone.Info;
DeviceExtendedProperties.GetValue("DeviceUniqueId");
or
Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
The problem is, either way didn't compile, I don't know what I'm missing. It says it was supported in WP8.1
This is the error when I use the name space at the top of the file:
using Microsoft.Phone.Info;
error CS0234: The type or namespace name 'Phone' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Same error when I call the function directly
Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
Upvotes: 0
Views: 342
Reputation: 113
I find the answer, Add the namespace at object browser.
anyway, thank you guys for the answer.
Upvotes: 1