DatastoreManager.GetPlatforms, méthode
Mise à jour : novembre 2007
Obtient une collection de toutes les plateformes enregistrées auprès du magasin de données.
Espace de noms : Microsoft.SmartDevice.Connectivity
Assembly : Microsoft.SmartDevice.Connectivity (dans Microsoft.SmartDevice.Connectivity.dll)
Syntaxe
Public Function GetPlatforms As Collection(Of Platform)
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>
Valeur de retour
Type : System.Collections.ObjectModel.Collection<Platform>
Une Collection<T> de toutes les plateformes.
Exemples
' 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);
}
Autorisations
- Confiance totale accordée à l'appelant immédiat. Ce membre ne peut pas être utilisé par du code d'un niveau de confiance partiel. Pour plus d'informations, consultez Utilisation de bibliothèques à partir de code d'un niveau de confiance partiel.