1. Getting Started with C##
Every program you write runs on a physical machine, is written in a language with rules, and is built by a developer using specific tools. This chapter sets the context: what computing is, how C# fits in, and how to set up a working environment.
Hardware and software: Programs run on physical machines through layers of abstraction.
Compilation: A compiler translates C# source code into machine-runnable code.
Development tools: The .NET SDK, terminal, editor or IDE, debugger, and Git work together to help you build, run, test, and track C# programs.
Program structure: Every C# program follows a predictable structural template.
Jumping straight into syntax without context leads to confusion later. Understanding the big picture of hardware, software, compilers, and IDEs gives you a mental model that makes every later topic clearer.
Video
Getting Started with C# & .NET in VS Code (Official Beginner Guide) by Visual Studio Code.
This video remains hosted on YouTube and is the property of its original creator or rightsholder; it is embedded here via YouTube’s official player for educational reference only.
Learning Objectives
By the end of this chapter, you will be able to:
Explain how source code becomes a running program through compilation or interpretation
Identify the parts of a basic C# program, including the namespace, class, and Main entry point
Install and verify a working .NET SDK and VS Code development environment
Create and run a C# console application from the command line
Use basic Git commands to track and commit changes to your code
Chapter Flow
Glossary
# |
Term |
Explanation |
|---|---|---|
1 |
IPO Model |
The Input-Process-Output model describing how a program takes input, transforms it, and produces output. |
2 |
SDLC |
Software Development Life Cycle; the stages a program moves through from planning to maintenance. |
3 |
Algorithm |
A precise, step-by-step procedure for solving a problem or completing a task. |
4 |
Expression |
A piece of code that evaluates to a value. |
5 |
Compilation |
Translating source code into machine-runnable code before the program runs. |
6 |
Interpretation |
Executing source code directly, line by line, without a separate compile step. |
7 |
Compiler |
A tool that translates source code into an executable program. |
8 |
Interpreter |
A tool that reads and executes source code directly. |
9 |
Exception |
An unexpected condition that disrupts a program’s normal flow at run time. |
10 |
.NET SDK |
The Software Development Kit that provides the tools needed to build and run .NET/C# programs. |
11 |
.NET Runtime |
The environment that executes compiled .NET programs. |
12 |
Terminal / Shell |
A text-based interface for running commands on your computer. |
13 |
IDE |
Integrated Development Environment; a tool that combines editing, building, and debugging. |
14 |
VS Code |
A free, cross-platform code editor commonly used for C# development. |
15 |
REPL |
Read-Eval-Print Loop; an interactive environment (like csharprepl) for trying out code one expression at a time. |
16 |
Git |
A version control system for tracking changes to code over time. |
17 |
Commit |
A saved snapshot of changes in a Git repository. |
18 |
Merge Conflict |
A situation where Git can’t automatically combine changes from two sources. |
19 |
.NET Template |
A starter project structure generated by the |
20 |
Console App |
A program that runs in a terminal window rather than a graphical window. |
21 |
Program.cs |
The default file name containing a C# program’s entry point. |
22 |
Top-Level Statements |
A modern C# feature that lets you write a program’s entry-point code without an explicit |
23 |
Solution |
A container ( |
24 |
Project |
A |
25 |
Code Block |
A group of statements enclosed in curly braces |