Click here to Skip to main content
15,896,207 members
Home / Discussions / C#
   

C#

 
AnswerRe: How we can stop to creating new Instance on same click of form Pin
Itanium25-May-05 23:03
Itanium25-May-05 23:03 
GeneralRe: How we can stop to creating new Instance on same click of form Pin
Trivikram Dwivedi25-May-05 23:54
Trivikram Dwivedi25-May-05 23:54 
QuestionHow we can export a string var to a matlab application using DLL ? Pin
hediii25-May-05 22:06
hediii25-May-05 22:06 
GeneralStandart input string Pin
rockxuyenmandem25-May-05 21:57
rockxuyenmandem25-May-05 21:57 
GeneralRe: Standart input string Pin
S. Senthil Kumar25-May-05 22:08
S. Senthil Kumar25-May-05 22:08 
Questionlog4net - smtp appender - HTML formatter? Pin
devvvy25-May-05 21:33
devvvy25-May-05 21:33 
Generalusing delegate Pin
d_vaibhav25-May-05 20:31
d_vaibhav25-May-05 20:31 
GeneralRe: using delegate Pin
S. Senthil Kumar25-May-05 22:03
S. Senthil Kumar25-May-05 22:03 
AFAIK, you can't do that directly with delegates. You need to use reflection for that. Something like
public class MyAirport
{
   delegate void ProcessAirportDelegate(MethodInfo methodInfo);
   ProcessAirportDelegate pa;
   public MyAirport(string airportName)
   {
     pa = new ProcessAirportDelegate(ProcessAirport);
   }

   private void ProcessAirport(MethodInfo methodInfo)
   {
      methodInfo.Invoke(this, new object[] {}); // Your parameters, if any.
   }

   public void CallProcessMethod(string methodName)
   {
     MethodInfo methodInfo = this.GetType().GetMethod(methodName);
     pa(methodInfo);      
   }
}

I created a delegate because your code had one. You can instead call methodInfo.Invoke directly from CallProcessMethod.

Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: using delegate Pin
d_vaibhav26-May-05 0:23
d_vaibhav26-May-05 0:23 
Questiondirectshow sdk? Pin
shumyla198325-May-05 18:24
shumyla198325-May-05 18:24 
AnswerRe: directshow sdk? Pin
Christian Graus25-May-05 19:22
protectorChristian Graus25-May-05 19:22 
GeneralDocking ToolBar Pin
thaibinhla25-May-05 18:22
thaibinhla25-May-05 18:22 
GeneralRe: Docking ToolBar Pin
John Arlen125-May-05 20:14
John Arlen125-May-05 20:14 
Questionhow to get audio and video streams using directshow? Pin
shumyla198325-May-05 18:21
shumyla198325-May-05 18:21 
GeneralFile Explorer in a Treeview Pin
John Waclawski25-May-05 16:15
John Waclawski25-May-05 16:15 
GeneralRe: File Explorer in a Treeview Pin
pubududilena25-May-05 23:06
pubududilena25-May-05 23:06 
GeneralRe: File Explorer in a Treeview Pin
John Waclawski26-May-05 15:54
John Waclawski26-May-05 15:54 
Questionhow to intercet ondraw event? Pin
Sasuko25-May-05 13:57
Sasuko25-May-05 13:57 
AnswerRe: how to intercet ondraw event? Pin
methodincharge25-May-05 14:07
methodincharge25-May-05 14:07 
GeneralRe: how to intercet ondraw event? Pin
John Arlen125-May-05 17:02
John Arlen125-May-05 17:02 
GeneralGeneric Collection question Pin
Pedro S Ferreira25-May-05 11:50
Pedro S Ferreira25-May-05 11:50 
GeneralRe: Generic Collection question Pin
Marc Clifton25-May-05 15:42
mvaMarc Clifton25-May-05 15:42 
QuestionOk. Can anyone help me figure out this? Pin
CherezZaboro25-May-05 11:03
CherezZaboro25-May-05 11:03 
AnswerRe: Ok. Can anyone help me figure out this? Pin
Christian Graus25-May-05 16:02
protectorChristian Graus25-May-05 16:02 
GeneralRe: Ok. Can anyone help me figure out this? Pin
CherezZaboro26-May-05 4:16
CherezZaboro26-May-05 4:16 

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.