C# 12 allows you to declare constructor parameters directly in the class definition. No more private fields and assignment blocks!
public class UserService(IDatabase db, ILogger logger) {
public void Save() => logger.Log("Saved to " + db.Name);
}
Why? It makes your classes significantly shorter and focuses the reader’s eye on the logic, not the setup.
