Click or drag to resize
StringLastIndexOf Method (String)
Reports the zero-based index position of the last occurrence of a specified string within this instance.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public int LastIndexOf(
	string value
)

Parameters

value
Type: SystemString
The string to seek.

Return Value

Type: Int32
The zero-based index position of value if that string is found, or -1 if it is not. If value is Empty, the return value is the last index position in this instance.
Exceptions
ExceptionCondition
ArgumentNullExceptionvalue is null.
See Also