# Getting Started

## How The Tutorial Works

The tutorial is divided into a number of lessons. Each lesson introduces new concepts, and sample code is displayed to demonstrate those concepts.&#x20;

If possible, try not to copy-paste the code. Instead, type out each line. You will start building coding "muscle memory" this way.

At the end of a lesson, the tutorial will test your knowledge. There will be questions or challenges for you to complete yourself.&#x20;

Make sure that before you tackle them, you understand what exactly the question or challenge is asking for.&#x20;

Beginner programmers sometimes get stuck because they go through lessons too fast. Going too fast can cause you to make mistakes. A small mistake can radically change your understanding of a concept.

If you find yourself unable to solve a challenge, go through the lesson again. Don't be afraid to go slow: you might have missed something small.&#x20;

C# can be very strict. You need to ensure that your code is precise and follows the structure expected.

## Set Up Your Workspace

You'll use [Dotnet Interactive Notebooks](https://github.com/dotnet/interactive) as your workspace. It's an extension for Visual Studio Code (a code editor) that allows you to write and run C# code directly in a virtual notebook.

{% hint style="success" %}
**Tip**

Visual Studio Code and the Dotnet Interactive Notebooks extension can be downloaded as a single installer. Go to the [Dotnet "Learn to Code"](https://dotnet.microsoft.com/learntocode) website and download the ".NET Coding Pack".
{% endhint %}

First, download and install the [latest Dotnet ](https://dotnet.microsoft.com/en-us/download/dotnet)from the Dotnet website. The minimum version needed by Dotnet Interactive Notebooks is **5.0**.

Download and install [Visual Studio Code](https://code.visualstudio.com/).

![](/files/-MdzWMqUlfxhCzvV09yS)

Launch Visual Studio Code. You'll see a screen similar to this one.

Open the Extensions panel by clicking the button on the sidebar, or from the menu bar by clicking on *View* then selecting *Extensions*.

![](/files/-Mdz_N58n7YKvfJkPU7G)

Type ".NET Interactive Notebooks" in the search bar on the Extensions panel. Click on the Install button to install the extension.

![](/files/-Mdza89WaSrxon3nAz1Q)

Create a new Notebook by opening the Command Palette (Ctrl-Shift P in Windows, Command-Shift P on Mac) and selecting ".NET Interactive: Create new blank notebook".

{% hint style="info" %}
You can also use keyboard shortcuts: Ctrl-Shift-Alt N (on Windows) or Command-Shift-Alt N (on Mac) to create the notebook.
{% endhint %}

![](/files/-MdzdbBbHueZzyfIRI8E)

&#x20;Select "Create as .dib" in the next section.

![](/files/-MdzeVAOTNsOO4HYia7M)

Next, select "C#" as the language.

![](/files/-MdzePfgouTXNzfd9FvY)

The .NET Interactive files will download if they haven't been installed yet.

When you see this screen, the notebook is ready! You can write C# code in the box.

![](/files/-MdzfxZfY84ecJe6VFMt)

To run the code, click on the Execute button on the left-hand side, or use the keyboard shortcut: Ctrl-Alt Enter (on Windows), Command-Alt Enter (on Mac).

![](/files/-MdzgEelJfEJ4VHO19O8)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://codingmama.gitbook.io/csharp-for-beginners/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
