The first of three one-hour Microsoft Reactor livestreams gets a beginner from an empty machine to writing and running C# in a notebook, and through strings and basic typing. Hanselman, who works on .NET at Microsoft, teaches; Cherita, who works in TypeScript and React in the M365 admin center group with some C# on the back end, plays the experienced developer from another language. The case the session makes is that notebooks let a learner meet the language before the ceremony around it.
Setup. In a fresh Windows Sandbox, Hanselman downloads the .NET Coding Pack from dotnet.microsoft.com/learntocode, which he says no one has seen before this stream. It installs VS Code, the C# compiler and libraries, and .NET Interactive notebooks, then opens a "C# for beginners" notebook. He separates C#, the language, from .NET, the libraries and ecosystem, which also hosts F# and Visual Basic. Viewers on Ubuntu install the parts by hand.
Notebooks instead of a project. A .dib file holds Markdown and code cells, each run with a play button. Cherita says that when she learned, she had to work backwards to discover which of the usings and namespaces she had been told to ignore actually mattered; the notebook hides them.
Strong typing and errors. Removing a semicolon produces a red squiggle that Hanselman likens to a spelling mistake. Reassigning a string variable to a number fails, which Cherita compares with TypeScript's strictness over JavaScript's looseness. He presents naming style (camel, Pascal, kebab, Hungarian) as a team decision.
Strings as objects. The $ prefix for interpolation, he argues, exists so old strings with curly braces do not change behaviour. Strings carry methods and properties such as ToUpper, Length, Trim, Replace and Contains; his digression on the Turkish dotted "i" shows that a culture taken silently from the machine can make two capitalised strings fail to match.
Habits. He tells viewers to remember that a method ought to exist rather than memorise it, and to put return values in variables so they can be debugged. The session closes on number types: an explicit cast from 10.5 to an int discards the fraction.