Can't get correct split() result
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;
}
sajid307Posted Apr 29, 2005, 4:37 AM
thewanzPosted Apr 28, 2005, 10:00 AM
sajid307Posted Apr 28, 2005, 5:18 AM
thewanzPosted Apr 27, 2005, 3:25 PM
sajid307Posted Apr 27, 2005, 11:37 AM
mibuytPosted Apr 25, 2005, 8:08 PM