Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "When the program is run, it creates a thread that will execute a code in the PrintNumbersWithDelay method."

A block of code is set as follows:

static void LockTooMuch(object lock1, object lock2)
{
  lock (lock1)
  {
    Sleep(1000);
    lock (lock2);
  }
}

Any command-line input or output is written as follows:

dotnet restore
dotnet run

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Right-click on the References folder ...

Get Multithreading with C# Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.