Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
Can't get correct split() result
thewanz
Apr 25 2005 5:07 PM
1.9k
Reply
I am trying to split a string into 3 parts (array) and return the last element(email address). Currently this code is returning the second and the third elements in VS.NET 2002. Can someone tell me why that is? private string getEmailAddr(string x) { string emStr = "Foo Foo
[email protected]
"; string[] parts = emStr.Split(new char[] {' '}, 3); emStr = parts[2].ToString(); return emStr; }
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
Selecting a printer to use without a dialogbox
Specified cast is not valid