C# Version Equals(Version)
Description
Version Equals(Version)
returns a value indicating
whether the current Version object and a specified Version object represent
the same value.
Syntax
Version.Equals(Version)
has the following syntax.
public bool Equals(
Version obj
)
Parameters
Version.Equals(Version)
has the following parameters.
obj
- A Version object to compare to the current Version object, or null.
Returns
Version.Equals(Version)
method returns true if every component of the current Version object matches the corresponding
component of the obj parameter; otherwise, false.
Example
//from ww w .ja va2 s . c o m
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.Equals(interim1));
}
}
The code above generates the following result.