C# DELEGATES ! Learn .NET FAST!

Поділитися
Вставка
  • Опубліковано 20 січ 2025

КОМЕНТАРІ • 6

  • @liam7073
    @liam7073 Рік тому +1

    You should have done an example with a return type.

  • @NoName-1337
    @NoName-1337 Рік тому

    What is the difference or the benefit compared to Action and Func?

    • @paulosouza449
      @paulosouza449 9 місяців тому

      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

  • @donas161
    @donas161 Рік тому +1

    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
      @shafialanower3820 10 місяців тому

      Sorry what do you mean by this? I am learning OOP but why would delegates scare you to modify other people code

    • @k9man163
      @k9man163 9 місяців тому

      ​@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.