Getting Started Lesson 1 of 15
Introduction to C#
What C# is, what .NET is, where C# is used (Unity games, Windows apps, websites), and what a first C# program looks like.
C# was created at Microsoft by a team led by Anders Hejlsberg and released in 2000. It runs on .NET, a free, open-source platform that works on Windows, Mac and Linux. C# combines the power of C++ with the ease of languages like Java.
Your first C# program
Console.WriteLine("Mabuhay, Pilipinas!");
Output
Mabuhay, Pilipinas!
Yes, one line. Modern C# (version 9 and later) supports top-level statements: you can write code directly in the file, and C# creates the Main method for you behind the scenes. Console.WriteLine prints a line of text.
The classic version
Older tutorials, many textbooks and some school projects use the full structure. It does exactly the same thing:
using System;
namespace HelloApp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Mabuhay, Pilipinas!");
}
}
}
Output
Mabuhay, Pilipinas!
using System;lets you useConsolewithout writingSystem.Console.namespacegroups related code.class Programholds the code;static void Mainis where the program starts.
This course uses the short top-level style for most examples, so you can focus on what matters. Both styles are correct.
Where is C# used?
| Area | Examples |
|---|---|
| Games | Unity games for phones, PC and consoles |
| Windows apps | Desktop programs with WinForms, WPF or WinUI |
| Websites and APIs | ASP.NET Core powers many company and government sites |
| Mobile apps | .NET MAUI for Android and iOS |
| Business systems | Inventory, payroll and POS systems in many companies |
Why learn C#?
- Beginner-friendly: clear syntax and very helpful error messages.
- Excellent tools: Visual Studio and VS Code suggest code as you type.
- Strongly typed: many mistakes are caught before the program runs.
- Games: it's the scripting language of Unity.
- Jobs: many companies, including outsourcing firms in the Philippines, build business software with C# and .NET.
C# and Java
C# and Java are like cousins: both have classes, garbage collection, strong typing and C-style syntax. Key differences you'll notice: C# uses Console.WriteLine instead of System.out.println, method names start with a capital letter (ToUpper()), and C# has handy features like properties, string interpolation and LINQ.
Quick Quiz
Check what you learned. Walang grade ito, practice lang. 🙂
By Sir Reyel · Last updated 2026-12-04