Share via


DatastoreManager.GetPlatforms Method

Gets a collection of all platforms registered with the Datastore.

Namespace:  Microsoft.SmartDevice.Connectivity
Assembly:  Microsoft.SmartDevice.Connectivity (in Microsoft.SmartDevice.Connectivity.dll)

Syntax

'Declaration
Public Function GetPlatforms As Collection(Of Platform)
'Usage
Dim instance As DatastoreManager 
Dim returnValue As Collection(Of Platform)

returnValue = instance.GetPlatforms()
public Collection<Platform> GetPlatforms()
public:
Collection<Platform^>^ GetPlatforms()
public function GetPlatforms() : Collection<Platform>

Return Value

Type: System.Collections.ObjectModel.Collection<Platform>
A Collection<T> of all platforms.

Examples

' Get the platforms in the Datastore 
Dim platforms As Collection(Of Platform) = dsmgr.GetPlatforms()

' For each platform, output name and ID
Console.WriteLine("Get all platforms with the GetPlatforms method: " + vbCr + vbLf)
Dim platform As Platform
For Each platform In platforms
    Console.WriteLine("Platform Name: " + platform.Name + "    ID: " + _
                      platform.Id.ToString())
Next platform
// Get the platforms in the Datastore
Collection<Platform> platforms = dsmgr.GetPlatforms();


// For each platform, output name and ID
Console.WriteLine("Get all platforms with the GetPlatforms method: \r\n");
foreach (Platform platform in platforms)
{
    Console.WriteLine("Platform Name: " + platform.Name + "    ID: " + platform.Id);
}

.NET Framework Security

See Also

Reference

DatastoreManager Class

DatastoreManager Members

Microsoft.SmartDevice.Connectivity Namespace