Left Function in C#
-
Hi All, anyone know the left function in C#? Thanks
-
Hi All, anyone know the left function in C#? Thanks
String.Substring(start, length)[^]
Jon Sagara When I grow up, I'm changing my name to Joe Kickass! My Site | My Blog | My Articles
-
Hi All, anyone know the left function in C#? Thanks
String cMyString = "This is my string";
MessageBox.Show(cMyString.Substring(0,5)
);[edit]oops...Jon got here first...[/edit]
--EricDV Sig--------- Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peters
-
String cMyString = "This is my string";
MessageBox.Show(cMyString.Substring(0,5)
);[edit]oops...Jon got here first...[/edit]
--EricDV Sig--------- Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peters
-
There is no "LEFT" function, but you can use Substring to return the left portion of a string: The following will display:
This
String cMyString = "This is my string";
MessageBox.Show(cMyString.Substring(0, 4));The following will display:
This is
MessageBox.Show(cMyString.Substring(0, 7));
--EricDV Sig--------- Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peters
-
There is no "LEFT" function, but you can use Substring to return the left portion of a string: The following will display:
This
String cMyString = "This is my string";
MessageBox.Show(cMyString.Substring(0, 4));The following will display:
This is
MessageBox.Show(cMyString.Substring(0, 7));
--EricDV Sig--------- Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peters