What is the method for separating the text ?
Eg. "A0000001 PERERA N SON"
In the above exapmle I want to seperate "A0000001" text from "A0000001 PERERA N SON" and asign that to a different variable.
What is the method for separating the text ?
Eg. "A0000001 PERERA N SON"
In the above exapmle I want to seperate "A0000001" text from "A0000001 PERERA N SON" and asign that to a different variable.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dinusha GamagePosted May 16, 2008, 7:52 AM
Thanks Manish !
Blocked AccountPosted May 16, 2008, 7:31 AM
You can do this by using this.
string value = "A0000001 PERERA N SON";
string value1 = value.Substring(0, value.IndexOf(" "));
Happy Coding!!