Click or drag to resize
PathGetExtension Method (String)
Returns the extension of the specified path string.

Namespace: Alphaleonis.Win32.Filesystem
Assembly: AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax
public static string GetExtension(
	string path
)

Parameters

path
Type: SystemString
The path string from which to get the extension. The path cannot contain any of the characters defined in GetInvalidPathChars.

Return Value

Type: String

The extension of the specified path (including the period "."), or null, or Empty.

If path is null, this method returns null.

If path does not have extension information, this method returns Empty.

Exceptions
ExceptionCondition
ArgumentExceptionThe path parameter contains invalid characters, is empty, or contains only white spaces.
ArgumentNullException
See Also