Click or drag to resize
FileSystemInfoName Property
For files, gets the name of the file. For directories, gets the name of the last directory in the hierarchy if a hierarchy exists. Otherwise, the Name property gets the name of the directory.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public abstract string Name { get; }

Return Value

Type: String
A string that is the name of the parent directory, the name of the last directory in the hierarchy, or the name of a file, including the file name extension.
See Also