CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums


Searches for the specified character and returns the zero-based index of the first occurrence within the entire source string.

Namespace: ?System.Globalization
Assembly: ?mscorlib (in mscorlib.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Function IndexOf ( _
	source As String, _
	value As Char _
) As Integer
C#
public virtual int IndexOf(
	string source,
	char value
)
Visual C++
public:
virtual int IndexOf(
	String^ source, 
	wchar_t value
)
JavaScript
function indexOf(source, value);

Parameters

source
Type: System..::.String
The string to search.
value
Type: System..::.Char
The character to locate within source.

Return Value

The zero-based index of the first occurrence of value within the entire source, if found; otherwise, -1.

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionsource is null.

See Also



Free Download:
   
  Privacy | Contact Us
All Times Are GMT