public static TwoByOne GetInstance() { TwoByOne twoByOne = new TwoByOne(); twoByOne.Total = 0; twoByOne.TrueCount = 0; return(twoByOne); }
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); }