asp.net.ph

String.Substring Method ( Int32 )

System Namespace   String Class


Retrieves a substring from this instance. The substring starts at a specified character position.

[ VB ]
<Serializable>
Overloads Public Function Substring ( _
   ByVal startIndex As Integer _
) As String

[ C# ]
[ Serializable ]
public string Substring (
   int startIndex
);

[ C++ ]
[ Serializable ]
public: String* Substring (
   int startIndex
);

[ JScript ]
public Serializable
function Substring (
   startIndex : int
) : String;

Parameters

startIndex
The starting character position of a substring in the given String.

Return Value

A String equivalent to the substring that begins at startIndex in the given String.

-or-

Empty if startIndex is equal to the length of this instance.

Exceptions


Exception Type Condition
ArgumentOutOfRangeException startIndex is less than zero or greater than the length of this instance.

Remarks

The index is zero-based.

See Also

String Members   String.Substring Overload List   Int32   Concat   Insert   Join   Remove   Replace   Split   Trim 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