Platform Class
Visual Studio 2008
Represents a Windows CE based platform, such as Windows Mobile 5.0 Pocket PC, that is registered in the Datastore.
Assembly: Microsoft.SmartDevice.Connectivity (in Microsoft.SmartDevice.Connectivity.dll)
This class does not have any constructors. To get an instance, use DatastoreManager.GetPlatform or DatastoreManager.GetPlatforms.
using System; using System.Collections.ObjectModel; using Microsoft.SmartDevice.Connectivity; class Example { static void Main(string[] args) { // Get datastore object DatastoreManager dsmgr = new DatastoreManager(1033); // Get the platforms in the Datastore Collection<Platform> platforms = dsmgr.GetPlatforms(); // For each platform, output name, ID, and platform properties. foreach (Platform platform in platforms) { Console.WriteLine("Platform Name: " + platform.Name + " ID: " + platform.Id); Console.WriteLine(" OSVersion: " + platform.GetProperty("OSVersion")); Console.WriteLine(" OSVersion: " + platform.GetOSVersion().ToString()); Console.WriteLine(" DefaultPlatform: " + platform.GetProperty("DefaultPlatform")); Console.WriteLine(" DefaultDevice: " + platform.GetProperty("DefaultDevice")); Console.WriteLine(" ShortName: " + platform.GetProperty("ShortName")); Console.WriteLine(" DefaultFormFactor: " + platform.GetProperty("DefaultFormFactor")); } Console.ReadLine(); } }