Sdílet prostřednictvím


DatastoreManager.GetPlatform-Methode

Aktualisiert: November 2007

Ruft ein Plattformobjekt ab, das der angegebenen Plattform-ID entspricht.

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

Syntax

'Declaration
Public Function GetPlatform ( _
    platformId As ObjectId _
) As Platform
'Usage
Dim instance As DatastoreManager
Dim platformId As ObjectId
Dim returnValue As Platform

returnValue = instance.GetPlatform(platformId)
public Platform GetPlatform(
    ObjectId platformId
)
public:
Platform^ GetPlatform(
    ObjectId^ platformId
)
public function GetPlatform(
    platformId : ObjectId
) : Platform

Parameter

Rückgabewert

Typ: Microsoft.SmartDevice.Connectivity.Platform

Die Plattform mit der angegebenen Plattform-ID.

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

Die Eingabezeichenfolge ist nullNULL-Verweis (Nothing in Visual Basic).

PlatformNotFoundException

Die angegebene Plattform wurde nicht in der Liste der Plattformen gefunden, die beim Datenspeicher registriert sind.

Beispiele

' Get the Windows Mobile 5.0 Smartphone platform
Dim wm5sp As New ObjectId(New Guid("BD0CC567-F6FD-4ca3-99D2-063EFDFC0A39"))
Dim p As Platform = dsmgr.GetPlatform(wm5sp)

' Output information
Console.WriteLine(vbCr + vbLf + vbCr + vbLf + _
                  "Get the WM5 Smartphone platform using the GetPlatform method: " + _
                  vbCr + vbLf)
Console.WriteLine("Platform Name: " + p.Name + "    ID: " + p.Id.ToString())
// Get the Windows Mobile 5.0 Smartphone platform
ObjectId wm5sp = new ObjectId(new Guid("BD0CC567-F6FD-4ca3-99D2-063EFDFC0A39"));
Platform p = dsmgr.GetPlatform(wm5sp);

// Output information
Console.WriteLine("\r\n\r\nGet the WM5 Smartphone platform using the GetPlatform method: \r\n");
Console.WriteLine("Platform Name: " + p.Name + "    ID: " + p.Id);

Berechtigungen

Siehe auch

Referenz

DatastoreManager-Klasse

DatastoreManager-Member

Microsoft.SmartDevice.Connectivity-Namespace