ArielX
ArielX

Reputation: 113

DeviceExtendedProperties in C# - Microsoft.Phone.Info name space

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

Answers (1)

ArielX
ArielX

Reputation: 113

I find the answer, Add the namespace at object browser.

anyway, thank you guys for the answer.

Upvotes: 1

Related Questions