You could use linq: string alphanumeric = new String(original.Where(c => Char.IsLetterOrDigit(c)).ToArray());