Does C# have an equivalent it vb6's Left(string,length) function?
Printable View
Does C# have an equivalent it vb6's Left(string,length) function?
Use the SubString() method passing in the arguments to get what you want.
string myString = "Hello";
myString = myString.SubString(1,2);
If you want to get the first letter you have to start at 0.
Mitchel
Cool, Thanks!
Ya, I was just showing that you throw in two arguments. Everything is 0 based in C#, just assumed he would know.Quote:
Originally posted by toto
If you want to get the first letter you have to start at 0.
Mitchel