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

System.IO.Path.GetFileNameWithoutExtension Method

Returns the file base component of the specified path string without the extension. [Edit]

public static string GetFileNameWithoutExtension (string path)

Parameters

path
A string containing the path of the file. [Edit]

Returns

A string consisting of the string returned by Path.GetFileName(string) , minus the implementation-specific extension separator character and extension. Platforms that do not support this feature return path unmodified. [Edit]

Exceptions

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

Remarks

Note: For additional details, see Path.GetFileName(string).
[Edit]

Requirements

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