Version |
[SerializableAttribute] [FlagsAttribute] public enum VersionFormats
Member name | Value | Description |
---|---|---|
None | 0 | Returns nothing at all. |
Name | 1 | Returns the name of the assembly. |
Title | 2 | Returns the full title of the assembly. |
Major | 4 | Returns the major version number of the assembly. |
Minor | 8 | Returns the minor version number of the assembly. |
MajorMinor | 12 | Returns both the major and minor version numbers of the assembly. Equivalent to Major + Minor. |
Build | 16 | Returns the build ID of the assembly. |
Revision | 32 | Returns the revision number of the assembly. |
Copyright | 64 | Returns copyright information from the assembly. |
Description | 128 | Returns the description of the assembly. |
Configuration | 256 | Returns the configuration designation of the assembly. |
RuntimeVersion | 512 | Returns the currently-executing Common Language Runtime version. |
LongVersion | 828 | Returns the entire version number (major, minor, build, revision) of the assembly. |
TimeStamp | 1,024 | Returns the UTC time stamp (if available) from the PE header |
All | 2,046 | Returns all version information from the assembly. |
var versionInfo = new VersionInfo(); var versionFormat = VersionFormats.MajorMinor | VersionFormats.Copyright; var version = GetVersionString(versionFormat); // Returns: // // 3.1 // Copyright ©2014 Inner Drive Technology. All rights reserved.