Exploring Code Using .NET Interactive Notebooks
Explore how to set up and use .NET Interactive Notebooks with the Polyglot notebooks extension in Visual Studio Code. Learn to create notebooks, write and execute C# code cells, add Markdown, and manage code execution flows to build interactive C# coding environments.
The Polyglot notebooks extension was previously named .NET Interactive Notebooks. But it retains its original identifier: ms-dotnettools.dotnet-interactive-vscode.
Note: You can read more about Polyglot here!
Exploring code using Polyglot notebooks
Polyglot notebooks makes writing code even easier than top-level programs. It requires Visual Studio Code, so if we did not install it and the Polyglot notebooks extension earlier, then please install them now.
Visual Studio 2022 has its own extension for notebooks named Notebook Editor, created by Microsoft’s machine learning team. It is not as mature as the Polyglot notebooks extension for Visual Studio Code, so it is not recommended.
Note: We can learn more and install Notebook Editor.
Creating a notebook
First, we need to create a notebook. This provides an interactive C# coding environment in the browser or IDE. Creating a new notebook gives us a clean slate to start writing and ...