Action is a predefined delegate for a void method, and Func is a predefined delegate that returns of type T.... Basically for Action => T = Parameter and for Func => T1 = Return type and T2 and T3 = parameters
Delegates scares me same as virtual classes, its hard to understand them in the code you did not write and takes a lot of effort review someones code properly, easy to create bugs in monolithic application, not recommended. On bigger scales better have DI and setup loging behaviour to your pipeline :)
@shafialanower3820 I think his point is it is pretty hard to follow if you have thousands of lines and functions are called back and forth between the program.
You should have done an example with a return type.
What is the difference or the benefit compared to Action and Func?
Action is a predefined delegate for a void method, and Func is a predefined delegate that returns of type T....
Basically for Action => T = Parameter and for Func => T1 = Return type and T2 and T3 = parameters
Delegates scares me same as virtual classes, its hard to understand them in the code you did not write and takes a lot of effort review someones code properly, easy to create bugs in monolithic application, not recommended. On bigger scales better have DI and setup loging behaviour to your pipeline :)
Sorry what do you mean by this? I am learning OOP but why would delegates scare you to modify other people code
@shafialanower3820 I think his point is it is pretty hard to follow if you have thousands of lines and functions are called back and forth between the program.