FileVersionInfo.FileName Property
.NET Framework 4.5
Gets the name of the file that this instance of FileVersionInfo describes.
Namespace: System.Diagnostics
Assembly: System (in System.dll)
Property Value
Type: System.StringThe name of the file described by this instance of FileVersionInfo.
The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Then it prints the FileName in a text box. This code assumes textBox1 has been instantiated.
- FileIOPermission
to get the file name. Associated enumeration: FileIOPermissionAccess.PathDiscovery
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.