4. What is generics?
ensure type-safety
the compiler will validate types while compiling, and throw an error if you try to
assign the wrong type to a variable.
5.
6. Benefits
No Casting, and Boxing
Increased Performance
Ensured strongly-typed Model
Reduced run-time errors
17. Iterators
is a way of navigating through the values in a collection.
specify the way values are generated when the foreach statement
accesses the elements within a collection.
20. Question?
What is the difference between IEnumerator and IEnumerable?
21. Question?
What is the difference between IEnumerator and IEnumerable?
IEnumerable
public IEnumerator GetEnumerator();
IEnumerator
public object Current;
public void Reset();
public bool MoveNext();