Mono Class Library: System.IO.Path Overview | Members

System.IO.Path.HasExtension Method

Returns a bool indicating whether the specified path includes an extension component.

public static bool HasExtension (string path)

Parameters

path
A string containing the path to search for an extension.

Returns

true if path includes a file extension.

Platforms that do not support this feature return false.

Exceptions

TypeReason
ArgumentExceptionpath contains one or more implementation-specific invalid characters.

Remarks

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0