Click or drag to resize

PathGetExtension Method (String, Boolean)

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,
	bool checkInvalidPathChars
)

Parameters

path
Type: SystemString
The path string from which to get the extension. The path cannot contain any of the characters defined in GetInvalidPathChars.
checkInvalidPathChars
Type: SystemBoolean
will check path for invalid path characters.

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
ArgumentException
See Also