Table of Contents

Method IndexOf

Namespace
Skyline.DataMiner.Net.Messages
Assembly
SLNetTypes.dll

IndexOf(string)

Searches for the specified string and returns the index of its first occurrence in the string array.

public int IndexOf(string needle)

Parameters

needle string

The string to locate in the string array.

Returns

int

The zero-based index of the first occurrence of needle, if found; otherwise, -1.

Exceptions

ArgumentNullException

needle is null.

IndexOf(string, StringComparison)

Searches for the specified string and returns the index of its first occurrence in the string array.

public int IndexOf(string needle, StringComparison comparisonType)

Parameters

needle string

The string to locate in the string array.

comparisonType StringComparison

One of the enumeration values that specifies the rules for the comparison.

Returns

int

The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, -1.

Remarks

If needle is null, -1 is returned.