.NET BCL Playbook
This course will teach you to use the .NET base class library effectively by showing the solutions to numerous practical problems, covering such topics as strings, collections, enums, file access, creating Windows services, and accessing system data.
What you'll learn
The Base Class Library (BCL) provides the basic data types like int and string that all C# programs depend on as well as the means for your code to interact with the operating system. In this course, .NET BCL Playbook, you’ll learn to use the .NET base class library effectively. You’ll see lots of examples of problems that can arise in real-world apps, and see how to leverage classes and methods in the BCL to write solutions.. Some solutions will cover using the .NET base types effectively: Date-times, strings, collections, enums and numeric types. Other solutions will give you practice using BCL classes that interact with the operating system, allowing your code to perform tasks such as exploring the file system, creating Windows services, consuming web APIs, or reading the registry. At the end of the course you’ll have a good understanding of the capabilities of the base class library, and be able to use it to solve a wide range of problems.
Table of contents
- Introducing the BCL Playbook 4m
- Module Summary 1m
- Everything Inherits from Object 3m
- Why Your Type Needs a String Representation 5m
- Overriding ToString() 3m
- ToString() with Records 2m
- Comparing for Equality – Reference Types 4m
- Implementing Value Equality with a Record 3m
- ReferenceEquals() and Reference Equality 1m
- Testing for Equality with Null Values 2m
- Equality for Value Types 4m
- Summary 1m
- Overview 1m
- Introducing DateTime, TimeSpan, DateOnly, and TimeOnly 6m
- Formatting DateTimes as Strings 5m
- Getting the Day of the Week 4m
- Humanizing Times 2m
- Parsing Dates and Times from Strings 6m
- Exporting Dates and Times for Round-tripping 3m
- Using ParseExact() to Import Round-tripped Data 3m
- Taking Account of Timezones with DateTimeOffset 3m
- Converting between Timezones 4m
- Summary 1m
- Overview 2m
- Reading a CSV File 5m
- Trimming Excess WhiteSpace 3m
- Removing Whitespace in the Middle of a String 3m
- Identifying Special Characters 2m
- Comparing for Strings Equality 3m
- Putting Strings in a Standard Form 2m
- Applying Grammar Rules: Making Words Plural 2m
- The Logic of Pluralizing 4m
- Extracting Substrings 3m
- Converting to Title Case 5m
- Converting to Sentence Case 3m
- Summary 2m
- Overview 2m
- Why You Need Multiple String Representations 2m
- Devising Format Strings 5m
- Implementing IFormattable 5m
- Consuming IFormattable 3m
- Introducing Custom Formatters 4m
- Implementing IFormatProvider 1m
- Implementing ICustomFormatter 4m
- What Are Interpolated String Handlers? 2m
- Implementing a Custom Interpolated String Handler 3m
- Consuming a Custom Interpolated String Handler 2m
- Summary 1m
- Overview 2m
- Choosing a Collection Type 2m
- Collections vs. Sequences 4m
- Collection Structural Equality 5m
- Comparing Lists More Efficiently 5m
- Finding Differences between Collections 3m
- Using Set Operations to Find Differences 3m
- Improving Efficiency by Manual Iterating 5m
- Returning a Sequence with Yield Return 2m
- Implementing the Differences Algorithm 4m
- Comparing the File Contents 5m
- Summary 2m
- Overview 2m
- Getting the User’s Documents Folder 2m
- Getting the Running Application’s Directory 6m
- Recursively Listing Files 5m
- Limiting the Files Returned 3m
- Subdirectories and Relative Paths 5m
- Searching for Files 3m
- Identifying Text Files 3m
- Searching for Text in Files 6m
- Backing up Files 3m
- Getting the Backup Name 4m
- Summary 1m
- Overview 1m
- What Is HTTP? 4m
- Introducing HttpClient 3m
- Using a Web API 5m
- Invoking the Web API with HttpClient 4m
- Parsing Web API Responses 3m
- Handling Errors 6m
- Demo: Testing Website Pages 3m
- Customizing an HttpClient with HttpClientHandler 4m
- Getting and Analyzing the HTTP Response 5m
- Getting Multiple Pages Asynchronously 2m
- Preventing Automatic Redirects 3m
- Summary 2m