EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

Path.GetFileNameWithoutExtension Method

July 28, 2014

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

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

public static string GetFileNameWithoutExtension(
	string path
)

Parameters

path
Type: System.String
The path of the file.

Return Value

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

ExceptionCondition
ArgumentException

path contains one or more of the invalid characters defined in GetInvalidPathChars.

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Mostrar:
© 2014 Microsoft