共用方式為


FilePathUtilities.GetFileExtension(String) Method

Definition

This method returns the file extension in lower case, including the "." and trims any blanks or null characters from the string. Null's can creep in via interop if we get a badly formed BSTR

public:
 static System::String ^ GetFileExtension(System::String ^ moniker);
public:
 static Platform::String ^ GetFileExtension(Platform::String ^ moniker);
 static std::wstring GetFileExtension(std::wstring const & moniker);
public static string GetFileExtension (string moniker);
static member GetFileExtension : string -> string
Public Shared Function GetFileExtension (moniker As String) As String

Parameters

moniker
String

The file path.

Returns

The extension (lower case, preceded by ".").

Applies to