blah blah blah is here! blah blah » Close

1
votes
2 answers

How do you use a delegate? Confused as to how you pass parameters?

Rick_A
761

Whey you create a method that takes a delegate, how does the caller pass parameters do the delegate function?

0
votes
2 answers

How can I emit a call to a delegate whose type is unfinished at the time of the emit?

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 ...

1
votes
1 answers

delegates

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 ...

1
votes
2 answers

Events

eeboy
499

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 ...

1
votes
1 answers

Anonymous delegate expressions

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); ...

Feedback