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# - PInvoke of NetUserAdd returns 24 -

NHibernate Passing Session to the Repository -

objective c - Mouse events for an NSSegmentedCell subclass? -