asp.net.ph

String.StartsWith Method

System Namespace   String Class


Determines whether the beginning of this instance matches the specified String.

[ VB ]
<Serializable>
Public Function StartsWith ( _
   ByVal value As String _
) As Boolean

[ C# ]
[ Serializable ]
public bool StartsWith (
   string value
);

[ C++ ]
[ Serializable ]
public: bool StartsWith (
   String* value
);

[ JScript ]
public Serializable
function StartsWith (
   value : String
) : Boolean;

Parameters

value
The String to seek.

Return Value

true if value matches the beginning of this string or is Empty; otherwise false.

Exceptions


Exception Type Condition
ArgumentNullException value is a null reference ( Nothing in Visual Basic ).

Remarks

This method makes a comparison at the beginning of the string, determines whether it matches this current instance, and returns a Boolean represetation of their relationship. The specified string must match the prefix or be an empty string ( that is, equals Empty ). The comparison is case-sensitive.

See Also

String Members   EndsWith Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph