C#
Learning C# and .NET from a Laravel/PHP background — the fundamentals, mapped to what you already know.
#csharp #dotnet #basics
Notes for picking up C# with a Laravel/PHP mental model already in place. The language is different, but the shapes are familiar — classes, services, models, namespaces. Most of the work is learning what each Laravel idea is called over here.
composer is dotnet/NuGet, Collections are LINQ, Eloquent is EF
Core.Start here
- C# basics — types, variables, and how to write a function (method).
- Classes & models — create a class, give it properties, and use it.
- Services & helpers — put code in another file and call it from anywhere.
- Project structure — how files, namespaces and the
dotnetCLI fit together.
The mental model
C# is compiled and statically typed — the opposite of PHP on both counts.
You declare types up front, the compiler checks them before the program runs, and
you build/run with the dotnet CLI instead of pointing a web server at a folder.
That feels heavier at first, then pays off: the editor knows exactly what
everything is, so autocomplete and refactoring are excellent.
In this section
C# Basics
Types, variables, control flow and how to write a function (method) in C#, mapped from PHP.
- #csharp
- #dotnet
- #basics
- #functions
Classes & Models
Create a class, give it properties and a constructor, and use it — the C# version of a Laravel model.
- #csharp
- #dotnet
- #classes
- #models
Project Structure
How C# files, namespaces, folders and the dotnet CLI fit together into a running app.
- #csharp
- #dotnet
- #tooling
- #architecture
Services & Helpers
Put code in another file — a service or a static helper — and call it from anywhere, the C# way.
- #csharp
- #dotnet
- #services
- #architecture
AI Prompting
Getting reliable, useful results out of language models.
C# Basics
Types, variables, control flow and how to write a function (method) in C#, mapped from PHP.