public static string RemoveSpecialCharacters(string str) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); for (int i = 0; i < str.Length; i++) if ((str[i] >= '0' && str[i] <= '9') || (str[i] >= 'A' && str[i] <= 'z' || (str[i] == '.' || str[i] == '_'))) sb.Append(str[i]); return sb.ToString(); }Reference: Muthukumar (http://nadarmuthukumar.blogspot.in)
0 comments:
Post a Comment