DEV Community

Discussion on: How to avoid the Factory pattern in C#

Collapse
 
smartcodinghub profile image
Oscar

Func are nameless. Making arguably "harder" to understand when you find it in the code. Creating a delegate allows you to name it and make easier to "inject" it using DI. And having a name also expresses what you intend to do with that function.