Exploring code using .NET Interactive Notebooks
.NET Interactive Notebooks makes writing code even easier than top-level programs. It requires Visual Studio Code, so if you did not install it earlier, please install it now.
Creating a notebook
First, we need to create a notebook:
- In Visual Studio Code, close any open workspaces or folders.
- Navigate to View | Command Palette.
- Type
.net inter
, and then select .NET Interactive: Create new blank notebook, as shown in Figure 1.13:Figure 1.13: Creating a new blank .NET notebook
- When prompted to select the file extension, choose Create as '.dib'.
.dib
is an experimental file format defined by Microsoft to avoid confusion and compatibility issues with the .ipynb
format used by Python interactive notebooks. The file extension was historically only for Jupyter notebooks that can contain an interactive (I) mix of data, Python code (PY), and output in a notebook...