Anonymous methods in c# .Net step by step - Interview Question.

preview_player
Показать описание

See our other Step by Step video series below :-

In this .NET and C# video we will see a small sample for Anonymous methods and in what situations to use anonymous methods.

Рекомендации по теме
Комментарии
Автор

Do not miss our Interview Question video series

dnfvideo
Автор

many people possess sound knowledge of subject but not all of them have good presentation skills.
Really Good presentation... Bonus: Like the way you summarize in the end! thanks for such useful tutorials... cheers!

AnujSethi
Автор

superb video, i have never seen better explanation for begineers reg:delegates and anonymous methods than this one.

gogulanaath
Автор

Sir . you know how to deliver knowledge.... thank you very much sir.. You explain a very important concept in simpler terms... its very easy to understand.

AmmarTravelDiaries
Автор

Excellent insight into anonymous performance benefit. Great Job.

saikovvuri
Автор

Wow. This is like Electronics Lab. You made your point with experiments. Cool. I like it.

BigyanChap
Автор

Recordings for anony methods
3010(Delegate Stored in cached)
315
310
369
309
559
568
526
545
535

recordings with named delegates
4242
1744
1807
1717
1627
1762
1785
1692
1769
1749

Delegates for anonymous methods are cached, so there is a small overhead for checking if the delegate already exists in the cache. On the other hand, if you run the method more than once, it will reuse the cached delegate instead of creating a new one.

Delegates for named methods are not cached, so it will be created each time.

vinodpasi
Автор

Excellent vedio, i don't have knowledge of stopwatch class, now get it .
Thanks a lots... pl post more vedio which explained in very simple manner

debalsaha
Автор

At the last of video, " If we want to use the delegate only inside the same function", does it mean that we can't instantiate PointtoAddFunction delagate to invoke a different method with the same signature or has a different meaning?
Please help me on this.

kunalful
Автор

Very good: short and clear. Thank you.

KDOERAK
Автор

super video for understanding anonymous methods

durgaprasad-ouhv
Автор

Can't you make updated video on this?

rishikeshnerkar
Автор

Can we have complex code in anonymous methods ? if it gives better performance why not use it for all del methods?

abhijithk
Автор

@Abhijith k - I think this has also to do with code re-usability... because its an inline code, it cannot be used anywhere else. May be like wrapping up an anonymous method inside a named method and call the named method. That would be the solution.. however, not sure if that makes sense!

nirman
Автор

hi i follow your videos. i had faced one  interview question. --can we make a class that cannot be instantiated
i said yes by using private constructor in  class. Then the he asked if the class cannot be instantiated what is the use, have you used in your project, and in dot net  every class will be instantiated at least once, if you have this class will it throw errors ..

Please provide me a video on this
 

haihaimama
Автор

i made a performance test between if and switch with Stopwatch class, the result is switch x3 faster than if

alibalbars
Автор

So calling a function takes that much time

BrutusPalmeira
Автор

This is incredible misleading, and not real world scenarios. What is slower is the instantiation of the delegate and not the code that runs.
If you have the method created, just call it (Add(2, 2, )).
And also if you are creating a delegate inside a loop, that's probably just plain bad design.

Pelibluepampum
join shbcf.ru