다음을 통해 공유


InstanceEnumeration Constructor

Creates an object of the InstanceEnumeration class.

네임스페이스: Microsoft.SqlServer.NotificationServices
어셈블리: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)

구문

‘선언
Public Sub New
public InstanceEnumeration ()
public:
InstanceEnumeration ()
public InstanceEnumeration ()
public function InstanceEnumeration ()

주의

The InstanceEnumeration constructor can be used in both managed and unmanaged code because it does not require any parameters.

The following examples show how to create and initialize an InstanceEnumeration object in managed code:

'Create an InstanceEnumeration object.
Dim myInstanceEnumeration As New InstanceEnumeration()

'Iterate through the instance descriptions.
Dim instanceDescription As NSInstanceDescription
For Each instanceDescription In myInstanceEnumeration
    Console.WriteLine("Instance Name: {0}", _
    instanceDescription.InstanceName)
Next instanceDescription
//InstanceEnumeration.GetEnumerator Method sample

//Create an InstanceEnumeration object.
InstanceEnumeration myInstanceEnumeration = 
    new InstanceEnumeration();

//Iterate through the instance descriptions.
foreach (NSInstanceDescription instanceDescription 
    in myInstanceEnumeration)
{
    Console.WriteLine("Instance Name: {0}", 
        instanceDescription.InstanceName);
}

The following example shows how to create an InstanceEnumeration object in unmanaged Microsoft Visual Basic Scripting Edition (VBScript) code:

'Create an InstanceEnumeration object.
set myInstanceEnumeration = WScript.CreateObject("Microsoft.SqlServer.NotificationServices.InstanceEnumeration")

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

InstanceEnumeration Class
InstanceEnumeration Members
Microsoft.SqlServer.NotificationServices Namespace