Getting Started with C# cover image

Getting Started with C#

By Sofia Reiter · Monday, September 15, 2025 · ~4 min read

A few weeks ago, I decided to take the plunge and start learning C#. Coming from a background of dabbling in Python and a little JavaScript, I wasn't sure what to expect. Now that I've spent some solid time with the language, I want to share my first impressions and what caught me off guard.

Why C#?

I kept seeing .NET mentioned in job postings, and several developers I follow recommended C# as a great language for building robust applications. The tooling looked impressive, and the fact that it runs cross-platform now sealed the deal for me. I figured if I'm going to invest time in learning a statically typed language, C# seemed like a solid choice.

Setting Up the Environment

Getting started was surprisingly smooth. I installed the .NET SDK, grabbed Visual Studio Code with the C# Dev Kit extension, and within minutes I had my first console application running:

Console.WriteLine("Hello, World!");

What surprised me was that this single line was the entire program. No class declaration, no Main method wrapping everything. I later learned this is called top-level statements, introduced in C# 9. It makes the entry point so much cleaner for simple programs.

Things That Surprised Me

Strong Typing Feels Different

Coming from Python, having to declare types felt restrictive at first. But then I discovered var and realized the compiler is smart enough to infer types in most situations:

var name = "Sofia";       // The compiler knows this is a string
var count = 42;            // And this is an int
var prices = new List<decimal> { 9.99m, 14.50m, 3.25m };

The real benefit clicked when I made a typo and the compiler caught it immediately instead of me finding out at runtime. That instant feedback loop is genuinely helpful.

Null Safety Is a Big Deal

One of the first warnings I encountered was about nullable reference types. C# now distinguishes between string and string?, which tells you whether a value can be null:

string name = "Sofia";    // Cannot be null
string? nickname = null;   // Explicitly nullable

if (nickname is not null)
{
    Console.WriteLine(nickname.ToUpper());
}

At first this felt like extra work, but I can already see how it prevents an entire category of bugs. In Python, I've been bitten by unexpected None values more times than I care to admit.

Pattern Matching Is Elegant

I stumbled across pattern matching while reading documentation, and it instantly became one of my favorite features:

string GetGreeting(object person) => person switch
{
    string name => $"Hello, {name}!",
    int age when age < 18 => "Hey there, young one!",
    int age => $"Greetings, person of {age} years!",
    null => "Hello, stranger!",
    _ => "I don't know what you are."
};

This is so much more readable than a chain of if-else statements.

What I'm Working On Next

I've built a few small console apps: a to-do list manager, a basic calculator, and a number guessing game. Nothing groundbreaking, but each project taught me something new about the language.

My next goal is to understand object-oriented programming in C# more deeply. Classes, interfaces, inheritance, and how they all fit together. I've read that C# is heavily OOP-oriented, so getting comfortable with these concepts feels essential before I move on to web development.

Final Thoughts

C# has been a pleasant surprise. The language feels modern and well-designed, the documentation is excellent, and the tooling makes the development experience genuinely enjoyable. If you're on the fence about learning it, I'd say go for it. The learning curve is manageable, and the ecosystem is vast enough that you won't run out of things to explore anytime soon.

I'll keep documenting my journey here. Next up: building something with ASP.NET Core!


Comments (2)

Anna Tuesday, March 3, 2026 5:08 PM

Great post! I learned a lot from this.

Clara Wednesday, March 11, 2026 8:08 PM

Interesting thought, thanks for adding that.

Ben Wednesday, March 4, 2026 5:08 PM

Interesting perspective, I hadn't thought of it that way.

Leave a Comment

4

min read