DatastoreManager.GetPlatforms 方法
更新:2007 年 11 月
取得已於資料存放區註冊的所有平台集合。
命名空間: Microsoft.SmartDevice.Connectivity
組件: Microsoft.SmartDevice.Connectivity (在 Microsoft.SmartDevice.Connectivity.dll 中)
語法
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>
傳回值
型別:System.Collections.ObjectModel.Collection<Platform>
所有平台的 Collection<T>。
範例
' 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);
}
使用權限
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。