EventMappingSettingsCollection.IndexOf(String) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した EventMappingSettings オブジェクトのインデックスを返します。
public:
int IndexOf(System::String ^ name);
public int IndexOf(string name);
member this.IndexOf : string -> int
Public Function IndexOf (name As String) As Integer
パラメーター
- name
- String
コレクション内の EventMappingSettings オブジェクトの名前。
返品
指定した EventMappingSettings オブジェクトのインデックス。オブジェクトがコレクション内に見つからない場合は -1。
例
次のコード例は、 IndexOf メソッドの使用方法を示しています。 このコード例は、 HealthMonitoringSection クラスに提供されるより大きな例の一部です。
// Get the index of the 'HeartBeats' event in the EventMappings collection property.
Console.WriteLine("EventMappings index for 'HeartBeats': {0}.",
healthMonitoringSection.EventMappings.IndexOf("HeartBeats"));
' Get the index of the 'HeartBeats' event in the EventMappings collection property.
Console.WriteLine("EventMappings index for 'HeartBeats': {0}.", _
healthMonitoringSection.EventMappings.IndexOf("HeartBeats"))