Returns a value indicating whether the current Version object is equal to a specified object.
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.
C# Example
using System; class VersionEqualsExample { static void testEquals(Version v1, Version v2) { Console.Write("It is {0} that version ", v1.Equals(v2)); Console.WriteLine("{0} is equal to {1}.", v1, v2); } public static void Main() { Version vers1 = new Version( "6.1.2.4" ); Version vers2 = new Version( 6, 1 ); testEquals( vers1, vers1 ); testEquals( vers1, vers2 ); } }
The output is
It is True that version 6.1.2.4 is equal to 6.1.2.4.