NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

CompareInfo.LastIndexOf (String, String, CompareOptions)

Gets the last index of a specified string within a string using flags.

[Visual Basic]
Overloads Overridable Public Function LastIndexOf( _
   ByVal source As String, _
   ByVal value As String, _
   ByVal options As CompareOptions _
) As Integer
[C#]
public virtual int LastIndexOf(
   string source,
   string value,
   CompareOptions options
);
[C++]
public: virtual int LastIndexOf(
   String* source,
   String* value,
   CompareOptions options
);
[JScript]
public function LastIndexOf(
   source : String,
   value : String,
   options : CompareOptions
) : int;

Parameters

source
The string to search.
value
The string to search for within the source.
options
The specified flags are the following data members: IgnoreCase, IgnoreKanaType, IgnoreNonSpace, IgnoreSymbols, IgnoreWidth, and StringSort.

Return Value

Value Meaning
Last index The last index ofvalue in thestring.
-1 The specified value is not found.
0 Thevalue argument is an empty string.

Exceptions

Exception Type Condition
ArgumentException is thrown if the value argument is null.

Remarks

The search is conducted through the entire source.

See Also

CompareInfo Class | CompareInfo Members | System.Globalization Namespace | CompareInfo.LastIndexOf Overload List