Returns the extension of the specified path string.
Namespace: System.IOAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static string GetExtension(
string path
)
Parameters
- path
- Type: SystemString
The path string from which to get the extension.
Return Value
Type:
StringThe extension of the specified path (including the period "."), or null, or
Empty. If
path is null,
GetExtension(String) returns null. If
path does not have extension information,
GetExtension(String) returns
Empty.
Exceptions See Also