votes
How do you use a delegate? Confused as to how you pass parameters?
Whey you create a method that takes a delegate, how does the caller pass parameters do the delegate function?
blah blah blah is here! blah blah » Close
Whey you create a method that takes a delegate, how does the caller pass parameters do the delegate function?
Hi everyone. I'm having trouble emitting a call to a delegate whose type is unfinished at the time of the emit. I'll elaborate: I'm trying to dynamically (i.e., with a [i]TypeBuilder[/i]) create the following class: [code] public MyClas ...
When "creating" delegates, my Gunnerson book says that I should do something like: delegate int MyDelegate(int i); MyDelegate abc = new MyDelegate(functionName); int functionName(int i) { } However, I came across some ...
I've created an event which is executed every time my USB device is connected/disconnected. [code] //Event for USB disconnect public delegate void DeviceDisconnectedHandler(); public event DeviceDisconnectedHan ...
Hi, the following code runs ok - [code]public delegate void IntAction(int x); class Program { static void Main(string[] args) { IntList xs = new IntList(); xs.Add(1); ...
Got feedack? Found a bug? report it here.