Gets or sets the major, minor, build, and revision numbers of the assembly.
Assemblies: mscorlib (in mscorlib.dll)
System.Reflection (in System.Reflection.dll)
All components of the version must be integers greater than or equal to zero. Metadata restricts the major, minor, build, and revision components for an assembly to a maximum value of UInt16.MaxValue - 1. If a component exceeds this value, no error is thrown; however, in a dynamic assembly, that component is zero.
This section contains two examples. The first example shows how to retrieve the version of the currently executing assembly. The second example shows how to use the property to specify the assembly version when you emit a dynamic assembly.
The following example retrieves and displays the version numbers of the currently executing assembly and the assembly that contains the String class.
The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the property is used to specify version information for the assembly.