public override int GetHashCode() { unchecked { int result = Major.GetHashCode(); result = result * 31 + Minor.GetHashCode(); result = result * 31 + Revision.GetHashCode(); result = result * 31 + GetReleaseTypeHashCode(ReleaseType); result = result * 31 + IncrementalVersion.GetHashCode(); // We do not compare the suffix, so we do not hash it either return(result); } }
public int CompareTo(UnityVersion other) { var result = Major.CompareTo(other.Major); if (result != 0) { return(result); } result = Minor.CompareTo(other.Minor); if (result != 0) { return(result); } result = Revision.CompareTo(other.Revision); if (result != 0) { return(result); } result = CompareReleaseType(ReleaseType, other.ReleaseType); if (result != 0) { return(result); } result = IncrementalVersion.CompareTo(other.IncrementalVersion); if (result != 0) { return(result); } // We do not compare the Suffix return(0); }