New answers tagged

3

The IEnumerator<T>.Current property must have only a getter. I.e., you are not allowed to change the Current value from outside. Only MoveNext() and Reset() are allowed. public TData Current => _current.Data; The IEnumerator.Current property can slightly be simplified. Add the expression body to the property instead of the getter (this defines the ...


1

License counting foreach (IGrouping<int, Installation> group in groupUsersQuery) { if (group.Count() == 1) { copiesNeeded += 1; } else if (group.Count() == 2) { if (group.ContainsComputerType("LAPTOP") && group.ContainsComputerType("DESKTOP")) { ...


Top 50 recent answers are included