Share via


Path.GetFileNameWithoutExtension Method

Returns the file name of the specified path string without the extension.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)

Syntax

public static string GetFileNameWithoutExtension (
         stringpath
)

Parameters

  • path
    The path of the file.

Return Value

A String containing the string returned by GetFileName, minus the last period (.) and all characters following it.

Remarks

This method does not verify that the path or file name exists.

Version Information

Available in the .NET Micro Framework versions 3.0, 4.0, and 4.1.

See Also

Reference

Path Class
Path Members
System.IO Namespace