Possible Duplicate:
How to find whether a string contains any of the special characters?
Dear All,
simple question I have a string and I want to make sure that there are special characters (like # $ _ & %) in that string.How can we achieve this using C#
Thanks
lokesh
Use String.IndexOfAny: http://msdn.microsoft.com/en-us/library/system.string.indexofany.aspx
Adjust the characters array so that contains the characters that you consider “special character” in your current context.