BF2Statistics.StringExtensions.MakeFileNameSafe C# (CSharp) Method

MakeFileNameSafe() public static method

Removes any invalid file path characters from this string
public static MakeFileNameSafe ( this fileName ) : string
fileName this
return string
        public static string MakeFileNameSafe(this string fileName)
        {
            return Path.GetInvalidFileNameChars().Aggregate(fileName, (current, c) => current.Replace(c.ToString(), string.Empty));
        }