Click here to Skip to main content
15,911,711 members
Home / Discussions / C#
   

C#

 
AnswerRe: notepad.exe Pin
engsrini28-Jan-07 4:22
engsrini28-Jan-07 4:22 
AnswerRe: notepad.exe Pin
Thomas Stockwell28-Jan-07 4:45
professionalThomas Stockwell28-Jan-07 4:45 
AnswerRe: notepad.exe Pin
zeltera28-Jan-07 5:00
zeltera28-Jan-07 5:00 
GeneralRe: notepad.exe Pin
Luc Pattyn28-Jan-07 6:15
sitebuilderLuc Pattyn28-Jan-07 6:15 
GeneralRe: notepad.exe Pin
zeltera28-Jan-07 7:25
zeltera28-Jan-07 7:25 
GeneralRe: notepad.exe Pin
bobsugar22228-Jan-07 22:26
bobsugar22228-Jan-07 22:26 
GeneralRe: notepad.exe Pin
zeltera29-Jan-07 0:37
zeltera29-Jan-07 0:37 
QuestionCreating and invoking instance of Action using reflection Pin
Girb28-Jan-07 3:11
Girb28-Jan-07 3:11 
Hi,

I'm having a problem with generics and reflection, trying to create an instance of a System.Action<> delegate and invoking it. I'm doing this:

// Create a type for Action<string>
Type type = typeof( Action<> ).MakeGenericType( new Type[] { typeof( string ) } );


So far so good. However, I can't figure out how to use Activator to create an instance of this so I can invoke it. The constructor for Action<> takes a "void (string) target", and I don't know how to express this in a call to Activator.CreateInstance. I.e., following the line above:

System.Delegate del = (System.Delegate)Activator.CreateInstance( type, new object[] { what_goes_here? } );


Anyone have a clue how to achieve this?
AnswerRe: Creating and invoking instance of Action using reflection Pin
Luc Pattyn28-Jan-07 6:18
sitebuilderLuc Pattyn28-Jan-07 6:18 
QuestionADVICE Pin
malak nour28-Jan-07 2:42
malak nour28-Jan-07 2:42 
Questionsetup a click event for Titlebar Pin
apostleofzion128-Jan-07 2:24
apostleofzion128-Jan-07 2:24 
AnswerRe: setup a click event for Titlebar Pin
Thomas Stockwell28-Jan-07 6:53
professionalThomas Stockwell28-Jan-07 6:53 
Questionshow / hide menu ? Pin
sanaziuse28-Jan-07 1:44
sanaziuse28-Jan-07 1:44 
AnswerRe: show / hide menu ? Pin
Thomas Stockwell28-Jan-07 4:46
professionalThomas Stockwell28-Jan-07 4:46 
Questionwindows service and webservice Pin
justintimberlake28-Jan-07 0:48
justintimberlake28-Jan-07 0:48 
QuestionCheck an internet connection Pin
CodeItWell28-Jan-07 0:29
CodeItWell28-Jan-07 0:29 
AnswerRe: Check an internet connection Pin
engsrini28-Jan-07 4:39
engsrini28-Jan-07 4:39 
GeneralRe: Check an internet connection Pin
Scott Dorman28-Jan-07 6:21
professionalScott Dorman28-Jan-07 6:21 
AnswerRe: Check an internet connection Pin
Glen Harvy28-Jan-07 9:30
Glen Harvy28-Jan-07 9:30 
GeneralRe: Check an internet connection Pin
CodeItWell28-Jan-07 10:51
CodeItWell28-Jan-07 10:51 
QuestionFormatting String Like VB6 ... Pin
abalbo27-Jan-07 23:46
abalbo27-Jan-07 23:46 
AnswerRe: Formatting String Like VB6 ... Pin
Luc Pattyn28-Jan-07 0:06
sitebuilderLuc Pattyn28-Jan-07 0:06 
GeneralRe: Formatting String Like VB6 ... Pin
abalbo28-Jan-07 0:51
abalbo28-Jan-07 0:51 
AnswerRe: Formatting String Like VB6 ... Pin
Guffa28-Jan-07 0:55
Guffa28-Jan-07 0:55 
GeneralRe: Formatting String Like VB6 ... Pin
abalbo28-Jan-07 1:05
abalbo28-Jan-07 1:05 

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.