O'Reilly logo

.NET Common Language Runtime Unleashed by Kevin Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

System.Version

This structure simply provides a wrapper around arbitrary version information. Listing B.18 shows some of its functionality (version.cs).

Listing B.18. Version Example
public class VersionMain
{
    static void Main(string [] args)
    {
        Version v1 = new Version("1.2.3.4");
        Version v2 = new Version(1,2,3,5);
        Console.WriteLine("{0}  {1} ", v1, v2);
        Console.WriteLine("v1 > v2? {0} ", v1 > v2);
    }
}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required