System.MethodExtension.IsUri C# (CSharp) Méthode

IsUri() public static méthode

public static IsUri ( this source ) : bool
source this
Résultat bool
        public static bool IsUri(this string source)
        {
            if (!string.IsNullOrEmpty(source) && Uri.IsWellFormedUriString(source, UriKind.RelativeOrAbsolute))
            {
                Uri tempValue;
                return (Uri.TryCreate(source, UriKind.RelativeOrAbsolute, out tempValue));
            }
            return (false);
        }