다음을 통해 공유


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);
}

권한

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

DatastoreManager 클래스

DatastoreManager 멤버

Microsoft.SmartDevice.Connectivity 네임스페이스