EventMappingSettingsCollection.IndexOf(String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the index of the specified EventMappingSettings object.
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
The name of an EventMappingSettings object in the collection.
The index of the specified EventMappingSettings object, or -1 if the object is not found in the collection.
The following code example shows how to use the IndexOf method. This code example is part of a larger example provided for the HealthMonitoringSection class.
// 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"))
Product | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: