Hunny Software Library Reference

ByteString.LastIndexOf Method (Byte, Int32)

Reports the index of the last occurrence of the specified byte in this instance.

[Visual Basic]
Overloads Public Function LastIndexOf( _
   ByVal by As Byte, _
   ByVal startIndex As Integer _
) As Integer
[C#]
public int LastIndexOf(
   byte by,
   int startIndex
);

Parameters

by
a byte value to seek
startIndex
starting position of the search

Return Value

position in this instance where by was found;
-1 if by was not found.

Remarks

The search ranges from startIndex to the beginning of the string.

Exceptions

Exception TypeCondition
ArgumentOutOfRangeExceptionstartIndex < 0
or startIndex > Length

See Also

ByteString Class | Hunny.Base Namespace | ByteString.LastIndexOf Overload List