I want to find whether a string contains any of the special characters like !,@,#,$,%,^,&,*,(,)....etc.
How can I do that without looping thorugh all the charact
Linq is the new black.
string.Any(c => char.IsSymbol(c));
For IsSymbol(), valid symbols are members of UnicodeCategory.
Edit:
This does not catch ALL characters. This may supplement:
string.Any(c => !char.IsLetterOrDigit(c));