C# Version Major
Description
Version Major
gets the value of the major component of
the version number for the current Version object.
Syntax
Version.Major
has the following syntax.
public int Major { get; }
Example
The following code example demonstrates the Version constructor, and Major, Minor, Build, Revision, MajorRevision, and MinorRevision properties.
/* w ww . j a va 2 s. c o m*/
using System;
class Sample
{
public static void Main()
{
Version std = new Version(1, 2, 1234, 2);
Console.WriteLine(std.Major);
Console.WriteLine(std.Minor);
Console.WriteLine(std.Build);
Console.WriteLine(std.Revision);
}
}
The code above generates the following result.