They are built from a mixture of source code, configuration files and XAML. Code isn't always written by hand; code generators and visual designers are used in several places to automate visual design, data access, and network communications code. Runtime features like Custom Attributes, Generics and Delegates mean .NET code is often structured very differently from similar code in C++ or Java.
Platform and Architecture
The .NET runtime environment provides a set of core services to your code in terms of compilation, security and memory management. In this module we will examine the core architecture of .NET and explore the concept of "managed" execution. We will look at how code gets packed and deployed into binaries called assemblies and how this code is loaded and executed at runtime.
One of the most powerful features of .NET is its comprehensive and pervasive type system. However, this type system has a number of aspects that need to be understood to work with .NET effectively. This module discusses the concepts of reference types, value types and the associated concept of boxing. It then proceeds to introduce generics - a technique for building code that can be used efficiently with many different types.
Reflection and Attributes
The .NET runtime relies on the availability of full-fidelity type information. The runtime and its associated libraries use this type information to provide powerful services to your code. This idea, however, is not limited to code that Microsoft has written, you can use the same ideas in your own code to build rich frameworks that can dynamically load code and even dynamically invoke it. The technology for working with the type system is known as reflection and has its own API - however, we will see that C#'s dynamic support makes writing reflection based code very simple. As well as being extremely rich, the .NET types information is also extensible via constructs called custom attributes. We will see how to annotate your code with attributes to influence the framework libraries you use and even how you can create your own attributes.
“Excellent trainer with real world experience which for me really added to this course”
Delegates and Events
There are many occasions when you want to be able to pass a method to another piece of code such that they can call it at some point (the most common is to allow a component to fire events that you act upon). .NET has an abstraction to model this idea called delegates - this is the general model for how you pass methods as data. However, because the event concept is so common, .NET also has events as a first class member of the .NET type system and languages have specific keyword support for them. However, sometimes you don't specifically want to invoke one of your class's methods but rather an arbitrary block of code. To help with this idea C# introduced first anonymous delegates and then lambda expressions. This useful constructs not only allow you to show the codes intent more clearly but also open up the powerful functional programming concept of closure.
Iterators bring features from the world of functional languages into C#. These features simplify boring code and make it possible to streamline code that has traditionally been awkward in C#. This talk explains Iterator methods as the basis of the Iterator Pattern in .NET and how they are the underpinning of LINQ.
Language Integrated Query is an attempt to merge SQL-like constructs directly into languages like C# and VB.NET. We look at this technology including the from / select / where syntax and talk about how LINQ can be used to query your collections of objects.
XML processing is incredibly common. Whether you are working in the world of web services, storing user specific state or processing data from other systems XML is often the vehicle of choice. It is no accident that .NET has had XML processing support since its inception and that idea keeps evolving. In this module we will start by looking at the core XML streaming API and then introduce LINQ to XML as the new API for XML processing. LINQ to XML allows you to locate information with a very concise syntax. However, more that that it allows both the generation of XML and a simple way of transforming XML data into objects.
Memory and Resource Management
One of the key services the .NET runtime provides is automated memory management. In this module we will introduce how and when the garbage collector runs and what it does to reclaim your unuse