NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

File.GetFileNameFromPath

Returns the name and extension parts of the given path.

[Visual Basic]
Public Shared Function GetFileNameFromPath( _
   ByVal path As String _
) As String
[C#]
public static string GetFileNameFromPath(
   string path
);
[C++]
public: static String* GetFileNameFromPath(
   String* path
);
[JScript]
public static function GetFileNameFromPath(
   path : String
) : String;

Parameters

path
The path of a file or directory.

Return Value

The name and extension parts of the given path.

Exceptions

Exception Type Condition
ArgumentException path is empty or contains only whitespaces.

See Also

File Class | File Members | System.IO Namespace