public override int GetHashCode() { int hash = 1; if (MajorNumber != 0) { hash ^= MajorNumber.GetHashCode(); } if (MinorNumber != 0) { hash ^= MinorNumber.GetHashCode(); } if (PatchNumber != 0) { hash ^= PatchNumber.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Appends the numbers in the order of their significance. /// </summary> /// <returns> /// Given a number [1, 2, 3], returns '1.2.3' /// </returns> public override string ToString() { return(numbers.Skip(1).Aggregate(MajorNumber.ToString(), (s, t) => s + "." + t)); }