Click here to Skip to main content
15,913,261 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: multi-user project design Pin
Michael P Butler11-Sep-03 5:49
Michael P Butler11-Sep-03 5:49 
QuestionIMessage Interface in Remoting? Pin
0siris11-Sep-03 3:20
0siris11-Sep-03 3:20 
GeneralStandardPrinter Pin
gecko2310-Sep-03 3:13
gecko2310-Sep-03 3:13 
GeneralCatching exception when starting exe from network drive Pin
the-unforgiven9-Sep-03 9:36
the-unforgiven9-Sep-03 9:36 
GeneralRe: Catching exception when starting exe from network drive Pin
0siris11-Sep-03 4:45
0siris11-Sep-03 4:45 
GeneralRe: Catching exception when starting exe from network drive Pin
Michael D Bray18-Sep-03 4:28
Michael D Bray18-Sep-03 4:28 
GeneralComplex data binding and ListView column sorting problem Pin
zinzinlabine7-Sep-03 6:18
zinzinlabine7-Sep-03 6:18 
GeneralReflection question Pin
Gluber20026-Sep-03 15:54
Gluber20026-Sep-03 15:54 
I am designing a modular application where users are allowed to "wire" components together visually.

My problem now is that i have to connect a method to an event using only reflection.
So using the refleciton apis i end up with
an EventInfo representing the event, and a MethodInfo for the method. Now i want to add the method to the event as a handler.

I should use the EventInfo.AddEventHandler method. This requires a delegate for the handler. So how do i convert from the methodInfo to a delegate ?

System.Delegate has a CreateDelegate static method, but all those require a "delegate Type" argument. I suppose this is there because the compiler generates distinct delegate derived types when seeing the "delegate" C# keyword.

However i can't know all those infos in advance so i can't have a delegeate type for each possible method signature..

Is there any way around this ? So i can connect any method to any event without a compile time known delegate type... ( since this would negate the benefit of wiring components from different plugin modules together ) Of course the connectio ncan only work if the method and event have the same signature.. otherwise just an exception should be thrown.
GeneralRe: Reflection question Pin
leppie7-Sep-03 4:08
leppie7-Sep-03 4:08 
GeneralSuspendLayout() doen't work on richTextBox Pin
eranas3-Sep-03 21:07
eranas3-Sep-03 21:07 
GeneralRe: SuspendLayout() doen't work on richTextBox Pin
leppie7-Sep-03 4:14
leppie7-Sep-03 4:14 
GeneralExposing properties (COM interop) Pin
Elbie2-Sep-03 5:31
Elbie2-Sep-03 5:31 
GeneralOverriding Paint message in TextEditBase or RichEditBox Pin
NormDroid2-Sep-03 4:46
professionalNormDroid2-Sep-03 4:46 
GeneralIPicture to System.Drawing.Image Pin
Corinna John2-Sep-03 3:37
Corinna John2-Sep-03 3:37 
GeneralTimezones and Date formatting Pin
AJB...1-Sep-03 10:05
AJB...1-Sep-03 10:05 
GeneralRe: Custom Collection based on ... Pin
dog_spawn4-Sep-03 16:58
dog_spawn4-Sep-03 16:58 
General.net DataSet Relations Lost.... Pin
mgaerber27-Aug-03 4:44
mgaerber27-Aug-03 4:44 
Generallost? Pin
dog_spawn4-Sep-03 17:02
dog_spawn4-Sep-03 17:02 
GeneralRe: lost? Pin
mgaerber9-Sep-03 20:12
mgaerber9-Sep-03 20:12 
GeneralVARIANT* in COM Interop Pin
Elbie27-Aug-03 0:48
Elbie27-Aug-03 0:48 
GeneralRe: VARIANT* in COM Interop Pin
Elbie27-Aug-03 5:08
Elbie27-Aug-03 5:08 
GeneralRe: VARIANT* in COM Interop Pin
igor19603-Sep-03 10:28
igor19603-Sep-03 10:28 
General.NET component in MFC applicaiton Pin
Member 45183026-Aug-03 20:23
Member 45183026-Aug-03 20:23 
GeneralRe: .NET component in MFC applicaiton Pin
J. Dunlap26-Aug-03 21:23
J. Dunlap26-Aug-03 21:23 
GeneralRe: .NET component in MFC applicaiton Pin
Member 45183026-Aug-03 21:47
Member 45183026-Aug-03 21:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.