次の方法で共有


AlertCollection.ItemById メソッド

システム定義の一意の識別子を使用して、AlertCollection コレクションからメンバーを抽出します。

名前空間:  Microsoft.SqlServer.Management.Smo.Agent
アセンブリ:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)

構文

'宣言
Public Function ItemById ( _
    id As Integer _
) As Alert
'使用
Dim instance As AlertCollection 
Dim id As Integer 
Dim returnValue As Alert 

returnValue = instance.ItemById(id)
public Alert ItemById(
    int id
)
public:
Alert^ ItemById(
    int id
)
member ItemById : 
        id:int -> Alert
public function ItemById(
    id : int
) : Alert

パラメーター

戻り値

型: Microsoft.SqlServer.Management.Smo.Agent.Alert
指定した ID 値を持つ Alert オブジェクトです。

説明

この型の public static (Microsoft Visual Basic では Shared) のすべてのメンバーは、マルチスレッド操作で安全に使用できます。インスタンス メンバーの場合は、スレッド セーフであるとは限りません。

使用例

コレクションの使用

関連項目

参照

AlertCollection クラス

Microsoft.SqlServer.Management.Smo.Agent 名前空間