DatastoreManager.GetPlatforms-Methode
Aktualisiert: November 2007
Ruft eine Auflistung aller Plattformen ab, die beim Datenspeicher registriert sind.
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>
Rückgabewert
Typ: System.Collections.ObjectModel.Collection<Platform>
Eine Collection<T> aller Plattformen.
Beispiele
' 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);
}
Berechtigungen
- Volle Vertrauenswürdigkeit für den unmittelbaren Aufrufer. Dieser Member kann von nur teilweise vertrauenswürdigem Code nicht verwendet werden. Weitere Informationen finden Sie unter Verwenden von Bibliotheken aus teilweise vertrauenswürdigem Code.