Are you still using a Visual Studio Console Application to write some simple testing code for C#/F#? Are you still looking for some alternative that is similar to Python Jupyter Notebook in .NET world? Are you still looking for a scratchpad application to write some simple .NET code?

Now you don't need to continue the search for the alternative, .NET Interactive is the one you need. It is exactly similar to Python Jupyter Notebook and you can install it at Visual Studio Code.

Getting Started

  1. Install the latest Visual Studio Code.
  2. Install the latest .NET 5 SDK
  3. Install the .NET Interactive Notebooks extension from the marketplace.

After you have installed it, to start it, just follow the steps below:

  1. Press Ctrl+Shift+P to open the Command Palette.
  2. Select .NET Interactive: Create new blank notebook.
  3. Create as '.dib' if you prefer the latest notebook format.
  4. Choose your preferred programming language from C#/F#/PowerShell.
  5. And you are done. Just start your coding :).

As you can see from the screenshot above, it supports IntelliSense (autocomplete) though it does not support debugging now.

FAQ:
Q: How to add reference for a library?
A: You can use something like below:

  #r "System.Data.SqlClient"  #r "nuget:System.Text.Json,4.7.2"  

Q: How about using keyword? Supported?
A: Yes

  using System.Net;  

This free site is ad-supported. Learn more