.NET Base Class Library


.NET Base Class Library

Authors: Jason Roberts, Paul D. Sheriff, Kevin Dockx, Xavier Morera, Stephen Haunts, Alexandru Dima

.NET ships with a powerful set of built-in libraries

What you will learn

  • Reading and writing files
  • Accessing databases with ADO.NET
  • Using HttpClient to make API calls
  • Working with JSON
  • Working with XML
  • How to use .NET cryptographic libraries


Knowledge of the C# programming language


Every program has to consume and save data and the course in this section will teach you the three main ways to do this in .NET. First you will learn how to work with files and streams, then how to access databases using ADO.NET and finally how to call APIs with .NET's HttpClient.

Working with Files and Streams in C#

by Jason Roberts

Oct 12, 2018 / 3h 12m

3h 12m

Start Course

At the core of C# file IO is a thorough knowledge of how to manipulate files and directories and use streams. In this course, Working with Files and Streams in C#, you will learn the skills you need to read and write text, binary, and CSV files, and work with streams of data. First, you will learn how to manipulate files and directories on disk. Next, you will discover how to respond to changes in the file system and read and write data by loading entire files into memory or by incrementally processing them with streams. Finally, you will explore how to write testable file IO code and how to use a mock file system to create faster-executing and more maintainable tests. When you’re finished with this course, you will have a foundational understanding of file access and stream manipulation code that will help you immensely as you move forward and create your own file- or stream-manipulating applications.

Table of contents
  1. Course Overview
  2. Managing Files and Directories
  3. Monitoring the File System for Changes
  4. Reading and Writing Entire Files into Memory
  5. Reading and Writing Data Incrementally Using Streams
  6. Reading and Writing CSV Data
  7. Creating Automated Tests for File Access Code

Implementing ADO.NET with C#

by Paul D. Sheriff

Feb 2, 2021 / 2h 29m

2h 29m

Start Course

In this course, Implementing ADO.NET with C#, you find out why ADO.NET is still relevant in today's ORM world. First you learn how to connect and submit queries to a database. Next you learn the fastest way to retrieve data using a DataReader. You then learn to handle exceptions and report back great debugging information. Disconnected classes such as a DataTable, DataSet and DataViews are explored next. Working with a the ADO.NET builder classes help automate some of your ADO.NET code. Finally, you see a great set of wrapper classes you can use to eliminate up to 90% of the ADO.NET code you used to have to write, without sacrificing efficiency. When you are finished with this course you will have the skills and knowledge to access databases in the most efficient manner possible, while using the least amount of code. Software required: Visual Studio 2019, .NET 4.5/.NET 5, C#.

Table of contents
  1. Course Overview
  2. Why You Still Need to Know ADO.NET
  3. Connecting and Submitting Queries to a Database
  4. Retrieve Data Quickly Using the SqlDataReader
  5. Handling ADO.NET Exceptions
  6. Disconnected Classes Are Useful
  7. The Building Blocks of the DataTable
  8. Builder Classes Make It Easy to Work with ADO.NET
  9. Making ADO.NET Easy to Use

Using HttpClient to Consume APIs in .NET Core

by Kevin Dockx

Jan 11, 2019 / 3h 20m

3h 20m

Start Course

Applications, ranging from ASP.NET Core web apps over mobile Xamarin apps and Windows apps to Console apps often integrate with an API. For that, HttpClient is the default and best option. But there’s a lot more to using it than just sending a request and reading out the response. In this course, Using HttpClient to Consume APIs in .NET Core, you’ll get an in-depth look at using HttpClient and HttpClientFactory, from the internals over basic CRUD interaction to working with streams and compression. We’ll also cover cancelling requests that are no longer needed.

Additionally, you’ll learn how to use custom message handlers to improve the reliability of your requests and to unit test.

After this course, you'll know the ins and outs of integrating with an API from a variety of application types.

Table of contents
  1. Course Overview
  2. Understanding Integration with an API Using HttpClient
  3. Handling Common Types of Integration (CRUD)
  4. Improving Performance with Partial Updates
  5. Improving Performance and Memory Use with Streams
  6. Supporting Cancellation
  7. Improving HttpClient Instance Management with HttpClientFactory
  8. Handling Faults and Errors
  9. Extending HttpClient with Custom HttpMessageHandlers
  10. Unit Testing with HttpClient


When it comes to serializing data, JSON and XML and two popular formats to do so. .NET has rich support for each format, and in this section you will learn how to leverage this support in your applications

Getting Started with JSON in C# Using Json.NET

by Xavier Morera

Aug 5, 2020 / 3h 47m

3h 47m

Start Course

The rising popularity of the web, mainly around JavaScript related technologies, has given JSON a great deal of importance over other data interchange formats, like XML.

In this course, Getting Started with JSON in C# Using Json.NET, you will learn foundational knowledge that will allow you to work with JSON in .NET.

First, you will learn the principles behind serialization fundamentals.

Next, you will discover how to control and customize serialization using settings and attributes. Then, you will explore advanced serialization and deserialization techniques, including LINQ to JSON.

Finally, you will learn about the future of Json.NET with .NET Core and .NET 5.

When you're finished with this course, you will have the skills and knowledge needed to work with JSON in .NET.

Table of contents
  1. Course Overview
  2. The Case for JSON and Json.NET
  3. Serialization Fundamentals
  4. Settings and Attributes
  5. Custom Serialization
  6. Performance Tips
  7. LINQ to JSON
  8. JSON and XML
  9. Binary JSON (BSON)
  10. Json.NET Schema
  11. Wrap Up

Working with XML in C#

by Paul D. Sheriff

Feb 2, 2021 / 1h 48m

1h 48m

Start Course

What are the best methods for reading and writing XML documents in C#? In this course, Working with XML in C#, you learn foundational knowledge to process XML files and use XML to enhance your business applications. First, you learn to process XML documents using LINQ to XML. Next, you discover how to write XPath queries. Next, you see how to add, edit and delete data within an XML document. XML serialization is explored to show you how to save a .NET object to an XML file, and then restore that XML as a .NET object. Finally, you explore how to cache frequently used database data as a local XML file, and to detect when server data changes so you can update your local file. When you’re finished with this course, you will have the skills and knowledge of XML needed to process XML documents in C#. Software required: Visual Studio 2017/19, .NET 4.5, .NET 5, SQL Server, C#.

Table of contents
  1. Course Overview
  2. What Exactly Is XML Anyway?
  3. LINQ to XML Makes Processing XML Documents Quick and Easy
  4. Use XPath Queries to Process XML Documents
  5. Modify Nodes and Write XML Files
  6. Store and Restore .NET Objects as XML
  7. A Design Pattern for Caching Frequently Used Data in XML


If you find yourself needing to encrypt or hash sensitive data, .NET has you covered with a rich set of built-in cryptographic functions. You will learn how to take full advantage of them in our Practical Cryptography in .NET course.

Building Secure Applications with Cryptography in .NET

by Stephen Haunts

Oct 16, 2020 / 3h 10m

3h 10m

Start Course

As a software developer you have a duty to your employer to secure and protect their data. In this course, Building Secure Applications with Cryptography in .NET, you will learn how to use the .NET Base Class Libraries (.NET Framework, .NET Core, .NET 5) to protect your data to satisfy confidentiality, integrity, non-repudiation, and authentication. First, you will explore random number generation and hashing. Then, you will discover authenticated hashing and password based key derivation functions. Finally, you will see both symmetric and asymmetric encryption using AES and RSA. By the end of this course, you will know how to combine these all together to produce a hybrid encryption scheme which includes AES, RSA, HMACS, and Digital Signatures.

Table of contents
  1. Course Overview
  2. Introduction
  3. Cryptographic Random Numbers
  4. Hashing Algorithms
  5. Secure Password Storage
  6. Symmetric Encryption
  7. Asymmetric Encryption
  8. Digital Signatures
  9. Hybrid Encryption
  10. Course Summary

.NET Regular Expressions

by Alexandru Dima

Feb 13, 2020 / 1h 15m

1h 15m

Start Course

Have you ever wanted to get a better understanding of how you can use and apply regular expressions in your .NET projects? Look no further! In this course, .NET Regular Expressions, you'll learn foundational knowledge to apply regex patterns to solve many of your software problems. First, you'll explore the history of regular expressions. Next, you'll discover pattern matching and string manipulation. Finally, you'll learn about how the regex engine works and how to optimize your expressions. When you're finished with this course, you'll have the skills and knowledge of .NET regular expressions needed to apply these awesome expressions to your existing software challenges.

Table of contents
  1. Course Overview
  2. Introduction to Regular Expressions
  3. Simple Operations with Regular Expressions
  4. Advanced Operations with Regular Expressions
Offer Code *
Email * First name * Last name *
Country *

* Required field

Opt in for the latest promotions and events. You may unsubscribe at any time. Privacy Policy

By providing my phone number to Pluralsight and toggling this feature on, I agree and acknowledge that Pluralsight may use that number to contact me for marketing purposes, including using autodialed or pre-recorded calls and text messages. I understand that consent is not required as a condition of purchase from Pluralsight.

By activating this benefit, you agree to abide by Pluralsight's terms of use and privacy policy.

I agree, activate benefit