Search This Blog

Wednesday, March 27, 2013

Substring function C#

C# > String > Substring

Substring function returns a string in a string

Parameters:

         [starting position] [length]

Example:

String myString = "abcdef";
myString = myString.Substring(0, 3); // "abc"

Other examples: