refactoring-code_smells-design_patterns icon indicating copy to clipboard operation
refactoring-code_smells-design_patterns copied to clipboard

Long Parameter List

Open EduardKrutii opened this issue 8 months ago • 0 comments

The constructor of the Booking class currently requires 11 parameters, making it difficult to read, use, and maintain. A long parameter list increases the likelihood of errors, as developers must remember the exact order of parameters when creating an instance. Additionally, it violates the Single Responsibility Principle (SRP) by handling too many pieces of information in a single constructor.

Link to file - https://github.com/CodelyTV/refactoring-code_smells-design_patterns/blob/main/examples/csharp/csharp-booking-01_base/src/Booking/Booking.cs

EduardKrutii avatar Feb 09 '25 19:02 EduardKrutii