About Constructor

What is the benefit of assigning the first value on the constructor in the project?

It is very important in case of the dependency injection (Inverse Of Control or IoC ). This is used for example in ASP.NET projects (but of course not only) when implementing database access with Entity Framework.

in program.cs will be declaration like

    builder.Services.AddTransient<ISQLDataAccess, SQLDataAccess>();

and this service (instance of class) can be accessed anywhere in the code

for example certain controller called MyController in MyController.cs file can use the instance of class following way:

 class MyController 
{
    private ISQLDataAccess _db; 
    
    public void MyController (ISQLDataAccess db)
    {
         _db = db;
     }
     // from now we can use all properties and methods defined in the ISQLDataAccess and variable 
    // for example : 
    
   public int GetNumber(string query) 
  {
       return _db.GetData(query) 
  }
}