c# - filename.Contains #(pound) or ' (single quote) -


How can I check in the filename "Pound sign" and "Astro sign" I have tried it now But does not work if I need to send an error if # or 'are in the file name

return the name of the file. ("# \ ');

You can use it:

  If filename.IndexOfAny (new letter [] {'#', '\' '}) gt; -1) {// file name is included in # or'}  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -