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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.