I have the following method that is replacing a \"pound\" sign from the file name but I want also to be able to replace the \"single apostrophe \' \" at the same time. How c
Try
return Regex.Replace(filename, "[#']", "_");
Mind you, I'm not sure that a regex is likely to be faster than the somewhat simpler:
return filename.Replace('#', '_') .Replace('\'', '_');