Chapter 5. C# in the .NET Framework

C# as a language is elegant and powerful. To fully use its capabilities you need to understand how it works within the .NET Framework. We begin with the root class object. Collections are examined next, including the methods of the object class that should be overridden to tap into the functionality provided by the .NET Framework. We then introduce interfaces, which allow you to rigorously define a contract for a class or struct to implement. In C# a class can implement multiple interfaces, even though it can inherit from only one class. Interfaces allow for dynamic programming; you can query a class at runtime to see whether it supports a particular interface.

The interfaces supporting collections are examined ...

Get Application Development Using C# and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.