DotNet By Ajay — New: ES2025 cheat-sheet is live!

July 10, 2026

C# Interview Question: Does the order of members inside a C# class matter?

Does the order of members inside a C# class matter?

Short Answer: No. The order of constructors, properties, methods, and fields inside a C# class does not affect compilation or runtime behavior. The C# compiler processes the entire class definition before generating Intermediate Language (IL).

July 3, 2026

C# 12 Primary Constructors: Features, Examples & Best Practices

C# 12 Features - Primary Constructors
C# 12 Features - Primary Constructors

Primary constructors are one of the most useful features introduced in C# 12 using the latest Visual Studio 2022 version or the .NET 8 SDK. They reduce constructor boilerplate, especially in Dependency Injection (DI) scenarios, making your code cleaner without changing how objects are created.

July 1, 2026

Entity Framework : Database First Approach vs Code First

There are 3 approaches through which Entity framework is implemented.

  • Database First Approach
  • Code First Approach
  • Model First Approach

May 31, 2026

LeetCode 185: Department Top Three Salaries | SQL DENSE_RANK Solution Explained with Example