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
Post a Comment