Ejemplo n.º 1
0
        public static TwoByOne GetInstance()
        {
            TwoByOne twoByOne = new TwoByOne();

            twoByOne.Total     = 0;
            twoByOne.TrueCount = 0;
            return(twoByOne);
        }
Ejemplo n.º 2
0
        public static TwoByOne GetInstance <T>(IEnumerable <T> tEnum, Predicate <T> predicate)
        {
            TwoByOne twoByOne = new TwoByOne();

            twoByOne.Total     = 0;
            twoByOne.TrueCount = 0;
            foreach (T t in tEnum)
            {
                twoByOne.Add(predicate(t));
            }
            return(twoByOne);
        }