What is the use of delegate in C# ?
1. Full .NET Interview Course (with PDF Book)
C# / ASP.NET Core / MVC / API - Top 500 Interview Questions
www.udemy.com/course/csharp-o...
Don't worry if course not helping you, Udemy has 30 days Free Refund Policy.
2. Quick Revision Book (PDF format)
Top 500 .NET Interview Questions - OOPS/ C#/ ASP.Net/ MVC/ SQL /.Net Core /Web API
imojo.in/interviewhappy
50% Discount Applied on above link.
Don't worry if book not helping you, I will return 100% of your money with in 7 days of purchase. Just mail me at anuragrawat123@gmail.com.
My best wishes are with you.
Пікірлер: 32
This less than 2 mins video has explained delegate to me better than a 2 hours video
@randomtech0
10 ай бұрын
Fact
@SagarShirke09
Ай бұрын
100 💯
@jackchitte
Ай бұрын
Is there 1-2hr video about delegate?
Thanks for explanation, i wasn't aware when interviewer asked me about this.. As web developer, i'm not familiar with this concept but seems interesting..
@interviewhappy
10 күн бұрын
Glad it was helpful!
Very helpful, have an interview tomorrow and this came up in my last interview but I couldn't answer it ☺️ PS one thing - you say the use is "when we have to pass a method as a parameter,", but when would you want to do that? A contextual example would have been even more helpful
@mohammadtalha2192
15 күн бұрын
Delegates are mainly useful when we want to pass a method as a callback function when we are using parallel processing or asynchronous programming.
Now most important question - why would someone call that method via another delegate and why cant call it directly?
@vivekpuri-08
11 ай бұрын
Exactly I was asked this in an interview.
@elallende
10 ай бұрын
@@vivekpuri-08 would you mind to let me know the expected answer ?
@rupeshkamble9105
9 ай бұрын
For callback mechanism.... You can pass method A as a param to method B. Executive whatever you want then call a method A as a notifier.
@louieb4878
9 ай бұрын
@@rupeshkamble9105 interesting. Can you share a good tutorial about callback mechanism?
Question - if I have to call the Mul method, should I instantiate the delegate again?
Nice clarification. Thank you very much
@interviewhappy
7 ай бұрын
Glad it was helpful! @john
built in delegate par bhi banao sir ❤
that's great explanation thanx buddy ❤
@interviewhappy
10 ай бұрын
Glad you liked it! @adarsh
Great this delegates is very confusing concept for me
@interviewhappy
8 ай бұрын
Yes, it has very less use for web developers but for winforms it's important
Sir you used add method anly , mul method how to use pls tell me
Very easy explanation❤
@interviewhappy
9 ай бұрын
Glad you liked it @swapnil
Can we call static method with delegate object are you sure?????
Delegate is used to call more than one function with single call.
What would be the output?
Bro method name apna likhna chahiye,
👍
@interviewhappy
Жыл бұрын
Thanks Siddehsh. Best of luck for your career.
Why even delegate we can write the normal method and we can call by using class object
@SagarShirke09
Ай бұрын
Same question from me also ?