Show / Hide Table of Contents

    Class Version

    Represents the version number of an assembly, operating system, or the common language runtime. This class cannot be inherited.

    Inheritance
    Object
    Version
    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: System
    Assembly: mscorlib.dll
    Syntax
    public sealed class Version

    Constructors

    | Improve this Doc View Source

    Version(Int32, Int32)

    Initializes a new instance of the Version class using the specified major and minor values.

    Declaration
    public Version(int major, int minor)
    Parameters
    Type Name Description
    Int32 major

    The major version number.

    Int32 minor

    The minor version number.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException
    | Improve this Doc View Source

    Version(Int32, Int32, Int32, Int32)

    Initializes a new instance of the Version class with the specified major, minor, build, and revision numbers.

    Declaration
    public Version(int major, int minor, int build, int revision)
    Parameters
    Type Name Description
    Int32 major

    The major version number.

    Int32 minor

    The minor version number.

    Int32 build

    The build number.

    Int32 revision

    The revision number.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Properties

    | Improve this Doc View Source

    Build

    Gets the value of the build component of the version number for the current Version object.

    Declaration
    public int Build { get; }
    Property Value
    Type Description
    Int32

    The build version number.

    | Improve this Doc View Source

    Major

    Gets the value of the major component of the version number for the current Version object.

    Declaration
    public int Major { get; }
    Property Value
    Type Description
    Int32

    The major version number.

    | Improve this Doc View Source

    Minor

    Gets the value of the minor component of the version number for the current Version object.

    Declaration
    public int Minor { get; }
    Property Value
    Type Description
    Int32

    The minor version number.

    | Improve this Doc View Source

    Revision

    Gets the value of the revision component of the version number for the current Version object.

    Declaration
    public int Revision { get; }
    Property Value
    Type Description
    Int32

    The revision version number.

    Methods

    | Improve this Doc View Source

    Equals(Object)

    Returns a value indicating whether the current Version object is equal to a specified object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    An object to compare with the current Version object, or null.

    Returns
    Type Description
    Boolean

    true if the current Version object and obj are both Version objects, and every component of the current Version object matches the corresponding component of obj; otherwise, false.

    Overrides
    Object.Equals(Object)
    | Improve this Doc View Source

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A 32-bit signed integer hash code.

    Overrides
    Object.GetHashCode()
    | Improve this Doc View Source

    ToString()

    Converts the value of the current Version object to its equivalent String representation.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    The String representation of the values of the major, minor, build, and revision components of the current Version object, as depicted in the following format. Each component is separated by a period character ('.'). Square brackets ('[' and ']') indicate a component that will not appear in the return value if the component is not defined: major.minor[.build[.revision]]

    Overrides
    Object.ToString()

    Extension Methods

    LogDispatcher.GetCurrentClassLogger(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018 nanoFramework Contributors
    Generated by DocFX