Most voted "delegate" questions
16 questions
Sort by count of
-
14
votes2
answers5656
viewsWhen and where to use a delegate in C#?
I’m new to C# and I still don’t fully understand the concept of using a delegate: public delegate void HTTPRequestsHandler(string url); I would like to know when to use them and in which cases a…
-
12
votes2
answers1960
viewsEmpty delegate ( delegate { } )
What returns the instruction delegate { }? Would be an empty delegate? In which situations would it be necessary to create an empty delegate?
-
11
votes1
answer1160
viewsWhat’s the difference between Vent and Delegate?
I see how it works delegate and event, but I saw no use of event. For example: public delegate void ChangedEventHandler(object sender, BaseEventArgs e); public ChangedEventHandler Changed; The code…
-
6
votes2
answers436
viewsDelegates and methods
When to use delegates? Being that a delegate points to a method, it is not the same thing as creating a normal method? What’s the difference and when to use and why to use? It’s better? Is worse?…
-
6
votes1
answer304
viewsWhat are the delegates?
In iOS programming it is common to use structures that act as delegates. One of them, for example, is the UITextFieldDelegate. This class, according to documentation, informs the implementor of…
-
5
votes2
answers490
viewsDoubts about the use of delegates
I still have not been able to fully absorb the use of the delegates, at what point I really should use a delegate and why of their construction. Then I ask the following question to the community.…
-
5
votes1
answer203
viewsWhat are the differences between local functions, delegates and English expressions?
Local functions will be present in C# 7. Given this, I would like to know the main differences between local functions, delegates and expressions Amble.
-
5
votes1
answer78
viewsA method can access the properties of the object it belongs to when stored through a delegate?
I’m building a dictionary of the following kind: <string, delegate>, that will access a method belonging to an object of the following class: class Example{ public int Power { get; set; }…
-
3
votes2
answers104
viewsUnderstanding a delegate’s lambda parameters in a function
I have the function below. I would just like to understand who is X and what values it is reaching in the course of the function. I could not catch the debug. You don’t have to say the exact values…
-
3
votes1
answer98
viewsDelegate (similar to C#) in Javascript
A feature I use a lot in C# is delegate which is a reference type used to reference anonymous or named methods. Especially classes already implemented in framework like the Action and the Func, as…
-
1
votes1
answer175
viewsConcept of delegate in Flutter
I saw that there is no support for delegate in flutter, is there any way to implement something like that? I believe that a callback work, I tried to formulate some examples but I’m not able to…
-
1
votes0
answers55
viewsList of int in delegate Func<> not working
I am studying something and I have come across the following problem. I create a list of 7 elements and treat it within an Func<> works, but if I increase the list items, then my method does…
-
0
votes1
answer57
viewsHow to create email in Swift using Mfmailcomposercontroller correctly?
I’m having trouble creating an email with MFMailComposerController on Swift. When trying to assign self to emailController.mailComposerController I get an error stating that I cannot assign…
-
0
votes1
answer489
viewsSynchronize Progressbar with Execution of class methods
In my project I have a class that has three methods: static List<string> ListaArquivos(string path){...} static void CriaArquivoUnico(List<string> listaArquivos){...} static void…
-
0
votes1
answer122
viewsFill a listbox with predicate<string>
I am studying DDD and Webapi and as I find difficulties, I research and try to solve. Of course, sometimes I come across simple things for some here and I can’t get it right away. Sometimes I even…
-
0
votes1
answer48
viewsWhy is jquery returning repeating information?
I’m using the command $("div").delegate( ".btnAcessoAtividade", "click", function() { var id = $(this).attr('id'); window.localStorage.setItem("id",id); console.log( $(this) );…