Lesson 23: Working with Nullable Types

Working with value types and data can sometimes be challenging because a value type doesn’t normally hold a null value. This lesson shows you how to overcome this limitation with C# nullable types. Here’s what you’ll learn. Understand the problem that nullable types solve See how to declare a nullable type Learn how to use … Continue reading “Lesson 23: Working with Nullable Types”

Lesson 22: Topics on C# Type

Throughout this tutorial, you’ve seen many different types, including those that are part of C# and custom designed types. If you’ve taken the samples and worked on them yourself, extending and writing your own programs, you are likely to have experienced errors associated with type. For example, you can’t assign a double to an int … Continue reading “Lesson 22: Topics on C# Type”

Lesson 21: Anonymous Methods

In Lesson 14: Introduction to Delegates, you learned about delegates and how they enable you to connect handlers to events. For C# v2.0, there is a new language feature, called anonymous methods, that are similar to delegates, but require less code. While you learn about anonymous methods, we’ll cover the following objectives: Understand the benefits … Continue reading “Lesson 21: Anonymous Methods”