magritton
9/15/2014 - 7:06 PM

C# Safe Path Name

public string GetSafePath(string filename)
        {

            return string.Join("_", filename.Split(Path.GetInvalidPathChars()));

        }