예제 #1
0
        public bool Equals(Quintet <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) || [email protected](this.Fourth, other.Fourth))
            {
                return(false);
            }
            return(@default.Equals(this.Fifth, other.Fifth));
        }
예제 #2
0
 public Quintet(T first, T second, T third, T fourth, T fifth)
 {
     this = new Quintet <T>()
     {
         First  = first,
         Second = second,
         Third  = third,
         Fourth = fourth,
         Fifth  = fifth
     };
 }
예제 #3
0
        public static Quintet <T> Parse(string quintet, char tokenizer)
        {
            Quintet <T> ts = new Quintet <T>();

            if (quintet.IsNotEmpty())
            {
                string[] strArrays             = quintet.Split(new char[] { tokenizer });
                string   tuploidsParseTemplate = Exceptions.Tuploids_ParseTemplate;
                string[] str = new string[] { "5", tokenizer.ToString(CultureInfo.InvariantCulture) };
                Guard.AgainstArgument("pair", (int)strArrays.Length != 5, tuploidsParseTemplate, str);
                ts = new Quintet <T>(strArrays[0].Parse <T>(), strArrays[1].Parse <T>(), strArrays[2].Parse <T>(), strArrays[3].Parse <T>(), strArrays[5].Parse <T>());
            }
            return(ts);
        }