C# Corner

Exploring C# 3.0

The latest iteration of C# introduces a host of new language features, most of which were created to enable functionality that you see in the .NET Framework 3.5's LINQ.

Initialize Objects Properly

Developers are accustomed to thinking of an object as either existing or not, but the truth is the initialization process is complex enough that this isn't always so. Learn how to initialize objects properly and avoid small missteps that can lead to big problems when creating and initializing objects.

Design Apps for Future Flexibility

You can't predict change, but you can prepare for it. Learn how to avoid cases where you need to remove work and rework too much of what you've already done.

Express Your Designs Clearly

Your code is the expression of your design intent -- make sure you communicate clearly.

Simplify Background Threads

It requires a lot of plumbing to create, manage, and communicate with background threads. The System.ComponentModel.BackgroundWorker class already contains the functionality you need to follow best practices.

Write Code for a Multithreaded World

Multithreaded programming is difficult because context switches can happen any time. Here are a few techniques to mitigate the chance of failure.

Reduce Lines of Code With C# 3.0

You already know what those new features in C# 3.0 are doing because you do these same things in C# 2.0. Learn how C# 3.0 can reduce coding lines and improve readability by walking through a reverse migration.

Write Robust Exception-Handling Code

Thrown exceptions break the normal flow of execution in a program to report error conditions. A few simple techniques can help you preserve execution flow and give users and administrators the information they need to understand what went wrong.

Generics: Move Beyond Collections

Generics can solve many more problems than collections. Use generics to write code once and reuse it more easily.

Understand Variable Scoping and Definite Assignment

Learn how to scope your variables correctly, as well as the rules governing definite assignment in C#.

Subscribe on YouTube