Paths

C#

Authors: Deborah Kurata, Jeremy Clark, Jason Roberts, Scott Allen, Elton Stoneman, Simon Robinson, Filip Ekberg, Dan Wahlin

C# is the most commonly used language for leveraging the .NET Framework. As such, learning C# is a springboard to creating enterprise systems, desktop applications, websites and... Read more

Beginner

Do you want to become productive with C#? This beginner area is the perfect place to start. These C# tutorials are designed to give you everything you need to become a productive C# developer. By the end of this section, you’ll have a firm understanding of the C# language and valuable insights on how things work under the hood.

1

C# Fundamentals with Visual Studio 2015

by Scott Allen

Sep 25, 2015 / 5h 21m

Beginner • 5h 21m

Start Course
Description

Hello, and welcome to Pluralsight! My name is Scott Allen, and I want to give you a quick overview of my course, C# Fundamentals with Visual Studio 2015. It’s designed to help you learn the essential topics you need for developing with the C# programming language, and covers things building classes, programing with objects, and working with interfaces using the C# language. Along the way, you’ll be using C#, Visual Studio and .NET. When you’re done, you’ll be ready to to tackle your own projects in the C# programming language. From there, you can start exploring working with nulls in C#, as well as designing fluent APIs. I look forward to working with you on C# Fundamentals with Visual Studio 2015, here at Pluralsight.

Table of contents
  1. Course Overview
    1m 19s
  2. An Introduction to C# and .NET
    42m 37s
  3. Classes and Objects
    48m 3s
  4. Assemblies
    36m 2s
  5. Types
    49m 40s
  6. Methods, Fields, Events, and Properties
    46m 26s
  7. Control Flow
    53m 1s
  8. Object Oriented Programming
    44m 37s
2

What's New in C# 6

by Scott Allen

Sep 20, 2014 / 1h 43m

Intermediate • 1h 43m

Start Course
Description

C# 6 introduces new syntax features for primary constructors, exception filtering, static class usage, and more. We'll examine each of these language features in detail, and also look at the area where Microsoft worked the hardest: the compiler itself. Code-named Roslyn, the new compiler comes with an architecture that makes it easier to build tools and extensions for both the C# and Visual Basic languages.

Table of contents
  1. Introduction
    18m 32s
  2. Language Features Part I
    23m 7s
  3. Language Features Part 2
    28m 17s
  4. Roslyn
    33m 23s
3

Working with Nulls in C#

by Jason Roberts

Sep 8, 2016 / 1h 25m

Intermediate • 1h 25m

Start Course
Description

Unexpected null values and NullReferenceExceptions can be a constant source of bugs resulting in wasted time and out of hours support callouts. In this course, Working with Nulls in C#, you're going to learn about the different ways that null values pop up in C# code and how to deal with them. First, you're going to learn the fundamentals of why you get null values and the difference between value and reference types. Next you'll learn how you can use the various C# operators to check for and manipulate nulls. Finally, you'll learn how to think about nulls at a higher abstraction level in your object-oriented code. By the end of this course, you'll understand the different types of objects in C#, how to correctly create nullable value types, how to use C# operators to work with nulls with fewer lines of code, and how to implement the Null Object pattern to remove the need to write repetitive null checking code.

Table of contents
  1. Course Overview
    1m 16s
  2. Working with Nullable Value Types and Strings
    30m 12s
  3. Accessing and Checking for Null Values
    29m 53s
  4. Eliminating Null Reference Exceptions
    23m 50s
4

C# Best Practices: Collections and Generics

by Deborah Kurata

Jan 27, 2016 / 3h 35m

Beginner • 3h 35m

Start Course
Description

When building applications we often deal with groups of things: a user's preferences, a customer's orders, or a product's color choices. To implement these groups of things in C#, we use collections. And to get the most from collections, we need to leverage generics. This course covers how, when, why, and best practices for using C# collections and generics, including arrays, generic interfaces, LINQ, delegates, and Lambda expressions.

Table of contents
  1. Course Overview
    1m 30s
  2. Introduction
    12m 15s
  3. Arrays
    24m 34s
  4. Building Generic Code with Generics
    30m 32s
  5. Generic Lists
    35m 22s
  6. Generic Dictionaries
    33m 3s
  7. Generic Collection Interfaces
    44m 16s
  8. LINQ
    27m 45s
  9. Final Words
    6m 11s

Intermediate

Once you have a strong foundation with C#, you can now start fine tuning your skills to create code that is more maintainable, extensible and , object-oriented. The C# courses in this section will provide everything you need to know to become a C# pro.

5

Object-Oriented Programming Fundamentals in C#

by Deborah Kurata

Jul 8, 2014 / 4h 22m

Beginner • 4h 22m

Start Course
Description

This course takes you through the principles and practices of object-oriented programming (OOP). The course provides you with the firm foundation in OOP that you need to progress to intermediate-level C# courses. It begins by showing you how to turn a set of words into a set of well-defined and related classes. Through demonstrations, it teaches you key object-oriented concepts such as abstraction, encapsulation, inheritance, polymorphism, and interfaces.

Table of contents
  1. Introduction
    16m 30s
  2. Identifying Classes From Requirements
    20m 36s
  3. Building Entity Classes - Part 1
    35m 46s
  4. Building Entity Classes - Part 2
    19m 8s
  5. Separating Responsibilities
    20m 42s
  6. Establishing Relationships
    41m 3s
  7. Leveraging Reuse
    35m 11s
  8. Building Reusable Components
    32m 5s
  9. Understanding Interfaces
    31m 49s
  10. Final Words and Next Steps
    9m 56s
6

C# Interfaces

by Jeremy Clark

Jul 2, 2013 / 2h 52m

Intermediate • 2h 52m

Start Course
Description

Do you want code that's maintainable, extensible, and easily testable? If so, then C# interfaces are here to help. In this course, we’ll take a look at how we can use interfaces effectively in our code. We'll start at the beginning ("What are interfaces?") and then explore why we want to use them. Along the way we'll create and implement own interfaces, see how to explicitly implement interfaces, and take a look at dynamic loading, unit testing, and dependency injection. All of which is made possible with interfaces.

Table of contents
  1. Interfaces, Abstract Classes, and Concrete Classes
    22m 17s
  2. Using Interfaces to Future-Proof Code
    22m 16s
  3. Creating Interfaces to Add Extensibility
    37m 41s
  4. Explicit Interface Implementation
    22m 10s
  5. Interfaces and Dynamic Loading
    37m 31s
  6. Advanced Topics
    30m 54s
7

LINQ Fundamentals with C# 6.0

by Scott Allen

Jul 28, 2016 / 4h 23m

Intermediate • 4h 23m

Start Course
Description

LINQ introduced radical changes to the C# language. In this course, LINQ Fundamentals with C# 6.0, you'll see features of the C# language that make LINQ work, as well as how to use LINQ effectively using practical examples. You'll start with seeing a demonstration of the power of LINQ along with some of the important features of the C# language for LINQ, including how to create and use extension methods and lambda expressions. Next, you'll focus on the behavior of LINQ queries and start to work with realistic data to learn how to filter, order, and project data. Finally, you'll see some demonstrations on how to use LINQ to XML as well as, how LINQ works with a remote datasource by using the Entity Framework against Microsoft SQL Server. By the end of this course, you'll be ready to process and query in-memory data, as well as work with XML and a SQL Server database.

Table of contents
  1. Course Overview
    1m 25s
  2. An Introduction
    14m 6s
  3. LINQ and C#
    45m 54s
  4. LINQ Queries
    37m 19s
  5. Filter, Ordering & Projecting
    43m 5s
  6. Joining, Grouping & Aggregating
    48m 43s
  7. LINQ to XML
    32m 46s
  8. LINQ and the Entity Framework
    39m 40s
8

Defensive Coding in C#

by Deborah Kurata

May 9, 2014 / 4h 32m

Intermediate • 4h 32m

Start Course
Description

You will learn how to write clean, maintainable, and testable code when faced with constantly changing requirements, legacy issues, intensive time pressures, and a rapidly evolving environment. You will also learn how to keep that code great after maintenance activities, multiple developers, and the ravages of time.

Table of contents
  1. Introduction
    16m 14s
  2. Defending Your Methods - Part 1
    57m 7s
  3. Defending Your Methods - Part 2
    23m 45s
  4. Automated Code Testing
    46m 58s
  5. Defending Your Methods Part 3: Returning Predictable Results
    32m 36s
  6. Defending Your Code Constructs
    32m 29s
  7. Asserts, Errors, and Exceptions
    54m 29s
  8. Final Words
    9m 7s
9

C# Events, Delegates and Lambdas

by Dan Wahlin

Apr 26, 2013 / 3h 11m

Intermediate • 3h 11m

Start Course
Description

Events, delegates and lambdas play an important role in the .NET framework but can be difficult to understand as developers first get started with the C# language. If you’re interested in gaining a more thorough understanding of how these C# technologies work then you’re in the right place! This course focuses solely on events, delegates and lambdas and provides insight into how they can be used in your .NET applications using the C# language.

Table of contents
  1. The Role of Events, Delegates and Event Handlers
    24m 23s
  2. Creating Delegates, Events and EventArgs
    54m 47s
  3. Handling Events
    21m 14s
  4. Lambdas, Action<T> and Func<T,TResult>
    36m 51s
  5. Events and Delegates in Action
    54m 14s
10

C# Extension Methods

by Elton Stoneman

Dec 16, 2013 / 3h 9m

Intermediate • 3h 9m

Start Course
Description

Extension methods are a powerful C# feature which are underused and often misunderstood. In this course you’ll learn all about writing, using and organizing extension methods, how the CLR implements them and what scenarios they enable. We’ll build a library of key extension methods you can use in your own projects to make your code cleaner, safer and more maintainable.

Table of contents
  1. Introducing Extension Methods
    51m 17s
  2. Advanced Extension Methods (part 1)
    32m 47s
  3. Advanced Extension Methods (part 2)
    37m 24s
  4. Extension Method Library (part 1)
    37m 21s
  5. Extension Method Library (part 2)
    31m 2s

Advanced

Whether you’re still learning C# or you’re a seasoned professional, the courses in this section will provide valuable insight into modern software development practices in C#. We'll cover asynchronous programming, how to unit test your code to insure correctness, and how to use dependency injection to create loosely coupled, maintainable applications. Finally, our “tips and traps” series will give you useful knowledge to make you more productive.

11

Getting Started with Asynchronous Programming in .NET

by Filip Ekberg

Aug 12, 2015 / 2h 1m

Beginner • 2h 1m

Start Course
Description

In this course, we will cover the way to get started with asynchronous programming in .NET. You will learn how to apply these patterns in new and existing applications and you will see how to avoid the common mistakes.

Table of contents
  1. Introduction
    14m 58s
  2. Understanding the Need for Asynchronous Code
    22m 5s
  3. Applying Asynchronous Programming in .NET
    53m 58s
  4. Deadlocking, State Machines, and What Really Goes On
    30m 40s
12

Automated Testing with MSTest V2

by Jason Roberts

May 18, 2018 / 2h 2m

Intermediate • 2h 2m

Start Course
Description

MSTest V2 is the evolution of the original "in-box" testing framework from Microsoft and is now a cross platform, open source testing framework. In this course, Automated Testing with MSTest V2, you'll learn how to use the framework to create automated test to help check your code is working correctly. First, you'll discover how to use the various assert features such as checking numeric, string, and collection values. Next, you'll explore how to take control of the test execution lifecycle and also execute additional setup or cleanup code. Finally, you'll learn how to execute a test multiple times with data driven tests and also how to customize and extend the MSTest framework to create more maintainable and readable test code. By the end of this course, you'll know how to create readable, maintainable, and customized automated tests with MSTest V2.

Table of contents
  1. Course Overview
    1m 5s
  2. Getting Started
    15m 10s
  3. Using Asserts to Pass or Fail Tests
    36m 24s
  4. Controlling and Customizing Test Execution
    22m 7s
  5. Creating Data Driven Tests
    22m 23s
  6. Reducing Code Duplication and Increasing Test Readability
    25m 20s
13

C# Concurrent Collections

by Simon Robinson

May 15, 2015 / 3h 32m

Advanced • 3h 32m

Start Course
Description

Learn how to use concurrent collections in multithreaded code! This course is a comprehensive introduction to the concurrent collections. It shows you how to use each of the main collection types: ConcurrentDictionary, ConcurrentQueue, ConcurrentBag, and ConcurrentStack. You'll learn the correct techniques for using these collections to avoid bugs such as race conditions, and also how to use BlockingCollection with the concurrent collections correctly in producer-consumer scenarios. The course rounds off with a look at some concurrent collection best practices.

Table of contents
  1. Introducing the Concurrent Collections
    43m 36s
  2. Introducing ConcurrentDictionary
    40m 24s
  3. Concurrent Dictionary Demo
    38m 41s
  4. The Producer-Consumer Collections: Queues, Stacks and Bags
    23m 8s
  5. Producer-consumer and BlockingCollection Demo
    27m 28s
  6. Some Concurrent Collections Best Practices
    38m 47s
14

Dependency Injection On-Ramp

by Jeremy Clark

Oct 21, 2013 / 2h 38m

Intermediate • 2h 38m

Start Course
Description

What is Dependency Injection? The answers to the question seem to cause more confusion than help. This course will get us started on the road to understanding. We'll take an example-based approach to see the problems caused by tightly-coupled code. We'll add Dependency Injection to trade that tight-coupling for loose-coupling. And that loose-coupling makes our applications much easier to extend, maintain, and test. Finally, we'll see how Dependency Injection Containers can provide benefits that would be difficult to implement ourselves. This just scratches the surface. Once we're done, we'll be ready to start our journey on the Dependency Injection superhighway.

Table of contents
  1. Overview and Tight Coupling
    33m 10s
  2. Loose Coupling
    27m 15s
  3. Taking Advantage of Loose Coupling
    22m 8s
  4. Unit Testing
    32m 41s
  5. DI Containers
    42m 55s
15

C# Tips and Traps

by Jason Roberts

Aug 20, 2013 / 3h 57m

Intermediate • 3h 57m

Start Course
Description

Whether you're still learning C# or you already have some experience, it's sometimes hard to know what you don't know. This course is designed to short-circuit your C# learning and provides a whole host of useful information about the sometimes under-used or unknown features of both the C# language and the .Net framework. It's suitable for those who are brand new to C# as well as experienced developers looking to "round off" their C# skills and "fill in the gaps".

Table of contents
  1. Part I
    33m 43s
  2. Part II
    41m 3s
  3. Part III
    40m 32s
  4. Part IV
    41m 3s
  5. Part V
    32m 22s
  6. Part VI
    48m 51s
16

C# Tips and Traps 2

by Jason Roberts

Sep 18, 2013 / 2h 43m

Intermediate • 2h 43m

Start Course
Description

Whether you're still learning C# or you already have some experience, it's sometimes hard to know what you don't know. This is the follow-up course to C# Tips and Traps and is designed to further short-circuit your C# learning and provides a whole host of useful information about the sometimes under-used or unknown features of both the C# language and the .Net framework. It's suitable for those who are brand new to C# as well as experienced developers looking to "round off" their C# skills and "fill in the gaps".

Table of contents
  1. Part I
    39m 22s
  2. Part II
    42m 49s
  3. Part III
    35m 4s
  4. Part IV
    46m

What you will learn

  • C# syntax
  • Object oriented paradigm
  • Arrays, lists, dictionaries
  • Interfaces
  • Generics
  • Events, delegates, and lambdas
  • LINQ
  • Asynchronous programming
  • Unit testing
  • Dependency injection
  • Extensibility points

Pre-requisites

No prior C# knowledge or experience is needed. Some understanding of common programming concepts, such as variables and looping, will be helpful.

Register for FREE. Get your Pluralsight IQ.

You’ll get unlimited access to adaptive skill assessments that help you validate your skills in as little as 5 minutes, and you'll get to see the Pluralsight platform first-hand.