C# DELEGATES in 8 minutes! Learn .NET FAST!

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

КОМЕНТАРІ •

  • @tutorialsEUC
    @tutorialsEUC  2 роки тому +1

    🚀C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp-progress-academy

  • @vagifk2864
    @vagifk2864 Рік тому +52

    Explained how it works, but not why and where ! Minus !

    • @zzz-ovidiu2015
      @zzz-ovidiu2015 11 місяців тому +1

      fr

    • @yumyum7196
      @yumyum7196 9 місяців тому +2

      Yea, which is key to understanding

    • @TheSeriousDog
      @TheSeriousDog 8 місяців тому +15

      Why: To try to impress other developers
      Where: Any place you want to make it more complicated

    • @rainrope5069
      @rainrope5069 5 місяців тому

      Use them for callbacks.

    • @KillAllCommies2
      @KillAllCommies2 5 місяців тому

      @@TheSeriousDog Take this with a grain of salt because I am a total noob. But from what I understand, delegates are a way to save processing with events, since these require delegates and are only processed when they are required. This seems to be important in contexts that requires a lot of processing optimization (example: video games)

  • @watsedhaene
    @watsedhaene 3 місяці тому +6

    I still have no idea why I should ever use delegates. Every example these youtubers make is something that could be done much simpler with much less code. Why would you make life harder on yourself?

  • @mansbjork5721
    @mansbjork5721 Місяць тому +1

    The only thing I'd say you left out and that matters are built-in delegates, such as Predicate.

  • @SaveTheHedgehog
    @SaveTheHedgehog Рік тому +4

    I like functional :) (specifically is the C# language, not F#)

  • @mansbjork5721
    @mansbjork5721 Місяць тому +1

    So, would it be okay to say delegates enable us to define a type of function?

  • @ezecel9
    @ezecel9 2 роки тому +5

    Do you think that sending a delegate into a entity method (following DDD) is a good practice? For example, if that delegate is a database request to get another entity that the first entity needs? Or we have to call it before? Thanks!

    • @tutorialsEUC
      @tutorialsEUC  2 роки тому +3

      Hi,
      No, that's not a good practice. Preferably entities should not access data directly or indirectly. Entities encapsulate business logic and they must not depend on lower-level stuff like database access :-)
      Good question!

    • @ezecel9
      @ezecel9 2 роки тому

      @@tutorialsEUC thanks!

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

    I have a question, as I am interested in the course, but I cannot attend it at the same time for 21 days. So, is it possible to buy just the acces to its videos ? Do you have more in-depth videos about all this subjects that can be purchased ?

  • @ahmedbahnasy2243
    @ahmedbahnasy2243 8 місяців тому

    Thanks for the simplicity !

  • @Ayman73795
    @Ayman73795 8 місяців тому +2

    i like functional programming

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

    I like functional

  • @bluemodize7718
    @bluemodize7718 Рік тому +7

    I like how you compare it to js because I have a lot of experience in js

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

      So true.. the reference to js was a lightbulb moment for me.. somehow seems much simpler to think of it as simply the c# version of a js callback

    • @tsmale316
      @tsmale316 Рік тому

      ​@@elijahgundorin1189exact same for me!

    • @abiofficial-ws7pn
      @abiofficial-ws7pn 5 місяців тому

      @bluemodize... Not sure if you're sarcastic or serious. That sentence referring to javascript is a double-edged sword since it'll make people unfamiliar with js think that they are poorly placed to understand delegates in C#

  • @ngocthuytran3114
    @ngocthuytran3114 Рік тому

    I would like to learn more about Functional Programming!

  • @iswilson
    @iswilson 8 місяців тому +1

    You never run the code?

  • @_yllw6155
    @_yllw6155 2 роки тому +2

    functional programming in an oop languange

  • @kailuu8185
    @kailuu8185 Рік тому +10

    Was going to buy your stuff….. but not now. You literally taught so little in this video and used the most pointless example.

    • @davidmuradyan4014
      @davidmuradyan4014 3 місяці тому

      But it was good for introduction. It was just 8 minutes)

  • @mohamedassekour2992
    @mohamedassekour2992 8 місяців тому +1

    there is a big difference between Explaining concept and Explaining a its syntax. you explained the syntax not the concept you waste my 8 min in nothing

  • @EMdragonKnight
    @EMdragonKnight 11 місяців тому

    Good video.

  • @SedaqatQuraishee
    @SedaqatQuraishee 2 місяці тому

    I like functional programming

  • @shantanilhazarika8264
    @shantanilhazarika8264 6 місяців тому

    I like functional

  • @trzztrzz2477
    @trzztrzz2477 Рік тому +5

    Yeah but what is the practical use? Is it really useful? I don't understand man. Why should I use this thing? Damn I wanna give this shit up.

    • @ernest1428
      @ernest1428 Рік тому +3

      Hey do you know what this is for? I am stuck since 6 hours trying to understand this shit in order to understand events hahaha

    • @LaughingMan44
      @LaughingMan44 6 місяців тому

      don't worry, you have mid-level programmers like this who are able to tell you what something is, but not why something is useful.

    • @watsedhaene
      @watsedhaene 3 місяці тому

      @@ernest1428 yeah me too man. I have to learn this for school but I've got no clue why you would do all this extra work. It makes your code much less readable too...

  • @rushas
    @rushas 11 місяців тому

    The explanation could have been simpler and easier to understand. Note that "simpler" does not mean less lines of code

  • @abhirajgawai505
    @abhirajgawai505 Рік тому

    I like functional

  • @PhysiquePablo
    @PhysiquePablo Рік тому

    i like functional

  • @xxmahir3000xx
    @xxmahir3000xx Рік тому

    thanks

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

    Handsome man

  • @KillAllCommies2
    @KillAllCommies2 5 місяців тому +2

    I didn't get it :V

  • @GiSeiNoREI
    @GiSeiNoREI 11 місяців тому +4

    That's an awful explanation of delegates.

  • @bojohannesen4352
    @bojohannesen4352 7 місяців тому

    What's up with the dumb thumbnails. I am so happy that they haven't worked out for you.

  • @hamaed19
    @hamaed19 Рік тому

    I like functional programming 🎉😊

  • @WolfgangMZwing
    @WolfgangMZwing 10 місяців тому

    not needed, interfaces do same job

  • @LaughingMan44
    @LaughingMan44 6 місяців тому

    at no point did you demonstrate why this is remotely useful, when I can just call the methods inside another method without having to pass them as arguments

  • @kvelez
    @kvelez 8 місяців тому

    PrintDelegate Display = Console.WriteLine;
    PrintDelegate Printer = (string text) => Console.WriteLine(text);
    PrintDelegate PrintToFile = (string text) =>
    {
    File.AppendAllText("C:/Users/kvele/Downloads/logs.txt", text);
    };
    void DbContext(PrintDelegate log)
    {
    log("DELETE FROM users");
    log("SELECT * FROM users");
    };
    Display("Hello World");
    Printer("Hello World");
    PrintToFile("Hello World");
    DbContext(Display);
    delegate void PrintDelegate(string text);

  • @vb_Sivvv
    @vb_Sivvv Рік тому

    i like functional

    • @bojohannesen4352
      @bojohannesen4352 7 місяців тому +2

      A shame that this tutorial is DYSfunctional