GetFileNameWithoutExtension Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Returns the file name of the specified path string without the extension.
Namespace: System.IO
Assembly: System.IO (in System.IO.dll)
Syntax
'Declaration
Public Shared Function GetFileNameWithoutExtension ( _
path As String _
) As String
public static string GetFileNameWithoutExtension(
string path
)
public:
static String^ GetFileNameWithoutExtension(
String^ path
)
static member GetFileNameWithoutExtension :
path:string -> string
public static function GetFileNameWithoutExtension(
path : String
) : String
Parameters
- path
Type: System. . :: . .String
The path of the file.
Return Value
Type: System. . :: . .String
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.