Reports the zero-based index position of the last occurrence of a specified string within this instance. Parameters specify the starting search position in the current string, the number of characters in the current string to search, and the type of search to use for the specified string. (Invariant culture, Ignore case).

Namespace: MonoSoftware.Core
Assembly: MonoSoftware.Core (in MonoSoftware.Core.dll) Version: 1.0.40.669 (1.0.40.669)

Syntax

C#
public static int LastIndexOf(
	this StringBuilder sb,
	string s
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function LastIndexOf ( 
	sb As StringBuilder,
	s As String
) As Integer
Visual C++
public:
[ExtensionAttribute]
static int LastIndexOf(
	StringBuilder^ sb, 
	String^ s
)
F#
static member LastIndexOf : 
        sb : StringBuilder * 
        s : string -> int 

Parameters

sb
Type: System.Text..::..StringBuilder
String builder instance.
s
Type: System..::..String
String to search for.

Return Value

Type: Int32
Index of the string

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type StringBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

See Also