Executing notebook cells
When you create your new notebook, you should see something like Figure 2.7:
Figure 2.7 – An empty C# code cell
This view consists of a few key parts:
- A toolbar at the upper left with a few commands – we’ll discuss these throughout this chapter
- The selected kernel at the upper right – this should be .NET Interactive.
- A gray box representing an empty code cell
- Indicators at the lower right telling you this is a code cell that will be interpreted as C#
- An Execute Cell button with a “play” icon on the left that allows you to run the cell
- A small toolbar at the upper right of the cell with additional commands
Click into your code cell and write the following line:
Console.WriteLine("Hello Polyglot Notebooks!");
Next, click the Execute Cell button to the left of the cell or press Ctrl + Enter on your keyboard.
This will send your code to ...