public Quartet(T first, T second, T third, T fourth) { this = new Quartet <T>() { First = first, Second = second, Third = third, Fourth = fourth }; }
public bool Equals(Quartet <T> other) { EqualityComparer <T> @default = EqualityComparer <T> .Default; if ([email protected](this.First, other.First) || [email protected](this.Second, other.Second) || [email protected](this.Third, other.Third)) { return(false); } return(@default.Equals(this.Fourth, other.Fourth)); }
public static Quartet <T> Parse(string quintet, char tokenizer) { Quartet <T> ts = new Quartet <T>(); if (quintet.IsNotEmpty()) { string[] strArrays = quintet.Split(new char[] { tokenizer }); string tuploidsParseTemplate = Exceptions.Tuploids_ParseTemplate; string[] str = new string[] { "4", tokenizer.ToString(CultureInfo.InvariantCulture) }; Guard.AgainstArgument("pair", (int)strArrays.Length != 4, tuploidsParseTemplate, str); ts = new Quartet <T>(strArrays[0].Parse <T>(), strArrays[1].Parse <T>(), strArrays[2].Parse <T>(), strArrays[3].Parse <T>()); } return(ts); }