System.IO.Path.Path.HasExtension C# (CSharp) Méthode

HasExtension() public static méthode

public static HasExtension ( string path ) : bool
path string
Résultat bool
		public static bool HasExtension (string path)
		{
			if (path == null || path.Trim ().Length == 0)
				return false;

			if (path.IndexOfAny (InvalidPathChars) != -1)
				throw new ArgumentException ("Illegal characters in path.");

			int pos = findExtension (path);
			return 0 <= pos && pos < path.Length - 1;
		}