Source Code
A free lesson from Swipe Coding · C#, level 1 · updated October 2026
By the Swipe team, founded by Colin · how we make lessons
When you write a C# program, you type text into a file — for example Program.cs. This human-readable text is called "source code". It consists of words and symbols that follow strict, well-defined rules, but is still readable to you.
using System;
class Program
{
static void Main()
{
Console.WriteLine("Hello, World!");
}
}A computer, however, cannot execute this text directly. A processor only understands "machine language" — tiny electrical signals represented as zeros and ones. Source code is therefore an intermediate stage: understandable for humans, but not yet directly executable by the hardware.
A computer processor can execute C# source code directly, without translating it first.
C# source code is always saved in files with the extension ".cs". Unlike some other languages, C# does not require the file name to match the name of a class inside it — you could name the file above "Greeting.cs" and it would still work fine, as long as it's part of the project.
C# source code files always have the file extension ____.
In summary: source code is the starting point of every C# program. It is the text that you, as a developer, write, read, and edit yourself. Later — with the help of another tool — this text becomes something the computer can actually execute. You will learn about that tool in the next lesson.
What best describes "source code"?
Keep your streak going in Swipe Coding
Swipe through every level of C# on your iPhone — with XP, stars, streaks, a personal advisor and the full track beyond these free levels.
Get the Swipe apps →