/// <summary> /// Determines whether the specified <see cref="T:Subtag"/> is equal to this instance. /// </summary> /// <param name="other">The other.</param> /// <returns></returns> public bool Equals(Subtag other) { if (other == null) throw new NullReferenceException(); return other.Code == Code; }
/// <summary> /// Compares the language subtags by name. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <returns></returns> public static int CompareByName(Subtag x, Subtag y) { if (x == null) { if (y == null) { return 0; } else { return -1; } } else { if (y == null) { return 1; } else { return x.Name.CompareTo(y.Name); } } }