|
-
Sep 19th, 2003, 03:43 PM
#1
Thread Starter
Addicted Member
Left
Does C# have an equivalent it vb6's Left(string,length) function?
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
-
Sep 19th, 2003, 04:15 PM
#2
PowerPoster
Use the SubString() method passing in the arguments to get what you want.
string myString = "Hello";
myString = myString.SubString(1,2);
-
Sep 19th, 2003, 05:26 PM
#3
Lively Member
If you want to get the first letter you have to start at 0.
Mitchel
-
Sep 19th, 2003, 05:51 PM
#4
Thread Starter
Addicted Member
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
-
Sep 19th, 2003, 07:48 PM
#5
PowerPoster
Originally posted by toto
If you want to get the first letter you have to start at 0.
Mitchel
Ya, I was just showing that you throw in two arguments. Everything is 0 based in C#, just assumed he would know.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|