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!

String.StartsWith

Determines whether a specified string is a prefix of the current instance.

[Visual Basic]
Public Function StartsWith( _
   ByVal value As String _
) As Boolean
[C#]
public bool StartsWith(
   string value
);
[C++]
public: bool StartsWith(
   String* value
);
[JScript]
public function StartsWith(
   value : String
) : Boolean;

Parameters

value
The string to search for.

Return Value

true if either value matches the beginning of this string or value is an empty string, otherwise false.

Exceptions

Exception Type Condition
ArgumentNullException If the string is null.

Remarks

The StartsWith 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 (i.e., equals Empty). The comparison is case-sensitive.

See Also

String Class | String Members | System Namespace