Duration: 17 minutes
Summary: In this video, we explore the use of the 'where' keyword when working with generic types. We use 'where' to specify that the type must meet a specific criterion (for example, it must be a class that implements a specific interface). In our example, we create a generic collection of T where T is a class that implements the IHomework interface. We have a student class that satisfy the criteria and a teacher class that does not. In Main(), we see how we can work with a student collection but not with the teacher collection (which does not even compile).
Methodology of the development of example: Good coding standard and simplified design.
Technology Used: C# 4.0
Keywords: C#, System, where, class, interface, LinkedList, foreach, override.