Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get OS Name and Version details in C# on windows mobile 7?

How can I find the OS name and os version which is installed in a phone that uses windows phone os.

like image 713
Nelson T Joseph Avatar asked Dec 28 '22 09:12

Nelson T Joseph


2 Answers

you can try these links

http://msdn.microsoft.com/en-us/library/ff941122%28v=VS.92%29.aspx

http://msdn.microsoft.com/en-us/library/microsoft.phone.info.deviceextendedproperties%28v=VS.92%29.aspx

you can try this

   public MainPage()
   {
            InitializeComponent();
            GetDeviceInfo();    
   }    
   public void GetDeviceInfo()
   {
            long ApplicationMemoryUsage = DeviceStatus.ApplicationCurrentMemoryUsage;
            long PeakMemoryUsage = DeviceStatus.ApplicationPeakMemoryUsage;
            string FirmwareVersion = DeviceStatus.DeviceFirmwareVersion;
            string HardwareVersion = DeviceStatus.DeviceHardwareVersion;
            string Manufacturer = DeviceStatus.DeviceManufacturer;
            string DeviceName = DeviceStatus.DeviceName;
            long TotalMemory = DeviceStatus.DeviceTotalMemory;
            string OSVersion = Environment.OSVersion.Version.ToString(); ;
            PowerSource powerSource = DeviceStatus.PowerSource;
            AddToList("Memory Usage :" + ApplicationMemoryUsage);
            AddToList("Peak Memory Usage :" + PeakMemoryUsage);
            AddToList("Firmware Version :" + FirmwareVersion);
            AddToList("Hardware Version :" + HardwareVersion);
            AddToList("Manufacturer :" + Manufacturer);
            AddToList("Total Memory :" + TotalMemory);
            AddToList("Power Source:" + powerSource.ToString());
            AddToList("Operating System: Windows Phone " + OSVersion.ToString());

   }    
   public void AddToList(string Property)
   {
            lstboxDeviceInfo.Items.Add(Property);
   }

take a look at here for more info

like image 70
Glory Raj Avatar answered Jan 27 '23 15:01

Glory Raj


Check out the DeviceStatus class.

Have a look at MSDN about it.

Added - after first comment

Check out System.Environment

System.Environment.OSVersion
like image 20
Lloyd Powell Avatar answered Jan 27 '23 13:01

Lloyd Powell