InstanceEnumeration クラスのオブジェクトを作成します。
名前空間: Microsoft.SqlServer.NotificationServices
アセンブリ: Microsoft.SqlServer.NotificationServices (microsoft.sqlserver.notificationservices.dll 内)
構文
'宣言
Public Sub New
public InstanceEnumeration ()
public:
InstanceEnumeration ()
public InstanceEnumeration ()
public function InstanceEnumeration ()
解説
InstanceEnumeration コンストラクタはパラメータを必要としないので、マネージ コードとアンマネージ コードの両方で使用できます。
使用例
マネージ コードで InstanceEnumeration オブジェクトを作成して初期化する例を次に示します。
'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);
}
Microsoft Visual Basic Scripting Edition (VBScript) のアンマネージ コードで、InstanceEnumeration オブジェクトを作成する例を次に示します。
'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