Adf.Business.ValueObject.FileName.IsValidFileName C# (CSharp) Méthode

IsValidFileName() private static méthode

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