Microsoft's Polyglot Notebooks bring C#, F#, PowerShell, JavaScript/TypeScript, SQL and more together inside VS Code. Mix languages, share variables, visualize data, create diagrams, and ship repeatable, runnable docs — all in a familiar, Jupyter-like notebook experience.
#!csharp
var x = new[]{1,2,3};
#!javascript
// uses C# variable
x.map(n => n*10);
Below are real screenshots from the official VS Code docs showing the Jupyter‑like notebook UI for Polyglot Notebooks.
Everything you need to get up and running in minutes inside VS Code.
#!csharp
Console.WriteLine("Hello from C#");
#!javascript
console.log('And hello from JS');
#!csharp
#r "nuget:MathNet.Numerics, 5.0.0"
using MathNet.Numerics.Statistics;
var data = new double[]{ 2.0, 3.5, 7.1, 4.2, 6.0 };
data.Mean();
#!csharp
var values = new[]{1,2,3,4,5};
#!javascript
values.map(x => x * 10);
#!sql
CREATE TABLE People(Id INT, Name NVARCHAR(50));
INSERT INTO People VALUES (1, 'Alice'), (2, 'Bob');
SELECT * FROM People;
#!csharp
var chartData = new [] {10, 20, 30, 40};
#!javascript
import * as Plot from "https://cdn.jsdelivr.net/npm/@observablehq/plot@0.6/+esm";
display(Plot.plot({
y: { label: 'Value' },
marks: [ Plot.barY(chartData) ]
}));
Official docs, repos, and community learning.
Inspiration for mixing languages and audiences.
Ship runnable docs: explain concepts with markdown, call your SDK via C#, then visualize responses in JS.
Use C# for data wrangling and models, JS for visualizations, and SQL cells to query local/remote data.
Create guided labs where attendees run code per step and keep the notebook as reference.
PowerShell cells for scripts, C# for helpers, and markdown checklists for safe, repeatable ops.
Alternate between explanation and code. Compare C# and F# versions side-by-side.
Call REST APIs from C#, parse JSON, then render HTML tables or charts for quick exploration.
#r "nuget:Package, Version"
then import with using
or open
..dib
files to Git, or export to .ipynb
. Include a README and Requirements (SDK versions, extension link).