C# is the language of choice for software developers building web or desktop applications. This course extends part 1 to cover topics such as extensibility, polymorphism, delegates, actions predicates, lambda expressions and LINQ as well as asynchronous programming
Extensibility and Polymorphism In this module we're going to talk about the related topics of Extensibility and Polymorphism. Key to the concept of extensibility are three concepts, composition, aggregation, and inheritance, and we will spend some time examining how they are related and how they differ. As we explore inheritance, we will look at calling Base Class methods, creating and using virtual methods, creating sealed classes, abstract classes, and interfaces.
LINQ In this module we take a look at LINQ. LINQ stands for language integrated query and was introduced to C# in C#3. LINQ comes in a number of flavors including LINQ to Objects and LINQ to SQL. LINQ allows you to query any collection including a collection in memory. You can get back a complete list of results or you can create collections of anonymous classes as return values. LINQ is extraordinarily powerful and has become very very popular among C# programmers. In exploring LINQ we will find that there are two ways to create a LINQ statement, using Method Syntax and Query Syntax. Query Syntax looks very much like SQL, whereas Method Syntax takes advantage of lambda expressions and can be terser and very expressive. Many C# programmers prefer the Method Syntax, although it does take a little bit of getting used to. LINQ has a number of powerful query operators that we will explore. These include orderby and group, but also such operators as any, contains, take, and zip, my favorite. Let's take a look at how LINQ works in a series of small demos.