Adf.Business.ValueObject.FileName.IsValidFileName C# (CSharp) Method

IsValidFileName() private static method

Checks whether the supplied value is a valid FileName or not.
private static IsValidFileName ( string newValue ) : bool
newValue string The value to check.
return bool
        private static bool IsValidFileName(string newValue)
        {
            try
            {
                new FileInfo(newValue);
            }
            catch
            {
                return false;
            }
            return true;
        }