Path.HasExtension Method
Determines whether a path includes a file name extension.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Syntax
public static bool HasExtension (
stringpath
)
Parameters
- path
The path to search for an extension.
Return Value
true if the characters that follow the last directory separator (\\ or /) or volume separator (:) in the path include a period (.) followed by one or more characters; otherwise, false.
Version Information
Available in the .NET Micro Framework versions 3.0, 4.0, and 4.1.