C# Version GreaterThan

Description

Version GreaterThan determines whether the first specified Version object is greater than the second specified Version object.

Syntax

Version.GreaterThan has the following syntax.


public static bool operator >(
  Version v1,
  Version v2
)

Parameters

Version.GreaterThan has the following parameters.

  • v1 - The first Version object.
  • v2 - The second Version object.

Returns

Version.GreaterThan method returns true if v1 is greater than v2; otherwise, false.

Example


/*w ww. j  ava 2  s.c om*/
using System;

class Sample 
{
    public static void Main() 
    {
        Version interim = new Version(1,2,3,4);
        Version interim1 = new Version(1,2,4,4);
    
        Console.WriteLine(interim > interim1);
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version