asp.net.ph

Version Class

System Namespace


Represents the version number for a common language runtime assembly. This class cannot be inherited.

Version Class Members

Collapse   Constructors

Visibility Constructor Parameters
public Version ( Int32 major , Int32 minor , Int32 build , Int32 revision )
public Version ( Int32 major , Int32 minor , Int32 build )
public Version ( Int32 major , Int32 minor )
public Version ( String version )
public Version ( )

Collapse   Properties

Visibility Name Value Type Accessibility
public Build Int32 [ Get ]
public Major Int32 [ Get ]
public MajorRevision Int16 [ Get ]
public Minor Int32 [ Get ]
public MinorRevision Int16 [ Get ]
public Revision Int32 [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
public Clone ( ) Object
public CompareTo ( Version value ) Int32
public CompareTo ( Object version ) Int32
public Equals ( Version obj ) Boolean
public Equals ( Object obj ) Boolean
public GetHashCode ( ) Int32
public static Parse ( String input ) Version
public ToString ( Int32 fieldCount ) String
public ToString ( ) String
public static TryParse ( String input , Version& result ) Boolean

Remarks

Version numbers consist of two to four components: major, minor, build, and revision. Components major and minor are required. Components build and revision are optional, but the revision component is only optional if the build component is not defined. All defined components must be decimal integers greater than 0. Metadata restricts the major, minor, build, and revision components to a maximum value of MaxValue- 1.

The format of the version number is as follows. Optional components are shown in square brackets ( ' [ ' and ' ] ' ) :

major.minor [ .build [ .revision ] ]

The components are used by convention as follows:

  • Major: Assemblies with the same name but different major versions are not interchangeable. This would be appropriate, for example, for a major rewrite of a product where backward compatibility cannot be assumed.
  • Minor: If the name and major number on two assemblies are the same, but the minor number is different, this indicates significant enhancement with the intention of backward compatibility. This would be appropriate, for example, on a point release of a product or a fully backward compatible new version of a product.
  • Build: A difference in build number represents a recompilation of the same source. This would be appropriate because of processor, platform, or compiler changes.
  • Revision: Assemblies with the same name, major, and minor version numbers but different revisions are intended to be fully interchangeable. This would be appropriate to fix a security hole in a previously released assembly.

Subsequent versions of an assembly that differ only by build or revision numbers are considered to be Quick Fix Engineering ( QFE ) updates of the prior version. If necessary, the build and revision numbers can be honored by changing the version policy in the configuration.

This class implements the ICloneable and IComparable interfaces.

Skip Navigation Links



Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph