If you are sure that there always will be one character separating the names you can use following snippet instead of your if clause.
char[] splitChars = new char[] {'.', ' ', ',', ';', ':',...};
if (username.IndexOfAny(splitChars) != -1)
{
string[] splitString = username.Split(splitChars);
username = splitString[splitString.Length - 1];
Console.WriteLine(username);
}
Otherwise you should try to use RegEx to perform matching.