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

TryParse() public static method

Tries to parse the supplied string into the supplied FileName object.
public static TryParse ( string s, FileName &result ) : bool
s string The string to parse.
result FileName The object.
return bool
        public static bool TryParse(string s, out FileName result)
        {
            if (string.IsNullOrEmpty(s))
            {
                result = Empty;
                return true;
            }

            if (!IsValidFileName(s))
            {
                result = Empty;
                return false;
            }

            result = new FileName(s);
            return true;
        }

Same methods

FileName::TryParse ( string s, IFormatProvider provider, FileName &result ) : bool