Click here to Skip to main content
15,903,030 members
Home / Discussions / C#
   

C#

 
GeneralRe: Enums in C# Pin
OsoreWatashi10-May-08 7:07
OsoreWatashi10-May-08 7:07 
GeneralRe: Enums in C# Pin
Anthony Mushrow10-May-08 7:33
professionalAnthony Mushrow10-May-08 7:33 
GeneralRe: Enums in C# Pin
OsoreWatashi10-May-08 8:25
OsoreWatashi10-May-08 8:25 
GeneralRe: Enums in C# Pin
Anthony Mushrow10-May-08 8:43
professionalAnthony Mushrow10-May-08 8:43 
AnswerRe: Enums in C# Pin
Ennis Ray Lynch, Jr.10-May-08 17:37
Ennis Ray Lynch, Jr.10-May-08 17:37 
Questionservers available in the network Pin
Member 400849210-May-08 4:38
Member 400849210-May-08 4:38 
AnswerRe: servers available in the network Pin
Dave Kreskowiak10-May-08 6:30
mveDave Kreskowiak10-May-08 6:30 
QuestionUnderstanding reflection.. Pin
som.nitk10-May-08 3:33
som.nitk10-May-08 3:33 
Hi, I am trying to understand how reflection works dynamically..

For that I am trying to call the Console.WriteLine static method dynamically..

This piece of code works where I call the WriteLine(string) method:

Type console = typeof(Console);

MethodInfo writeLineMethod = console.GetMethod("WriteLine", new Type[] { typeof(String) });

writeLineMethod.Invoke(console, new Object[]{"NewBie0915"} );


However when I try to call the Console.WriteLine(string, object) method, it dosent call it !!

Please tell me why... In the following code, only "Hey" is displayed instead of "Hey NewBie0915!"..

Type console = typeof(Console);

MethodInfo writeLineMethod = console.GetMethod("WriteLine", new Type[] { typeof(String), typeof(Object) });

writeLineMethod.Invoke(console, new Object[]{"Hey ", "NewBie0915!"} );



Does it have problems converting from String to Object? I am not able to understand this..

Any help would be appreciated..

Thanks !!
AnswerRe: Understanding reflection.. Pin
Roger Alsing10-May-08 3:57
Roger Alsing10-May-08 3:57 
QuestionEncryption and decryption using Certificate store across machines Pin
talisker7710-May-08 3:16
talisker7710-May-08 3:16 
AnswerRe: Encryption and decryption using Certificate store across machines Pin
Ennis Ray Lynch, Jr.10-May-08 17:39
Ennis Ray Lynch, Jr.10-May-08 17:39 
Questionpie chart in c# Pin
Pankaj Garg10-May-08 0:12
Pankaj Garg10-May-08 0:12 
AnswerRe: pie chart in c# Pin
Dave Sexton10-May-08 0:32
Dave Sexton10-May-08 0:32 
QuestionRe: pie chart in c# Pin
Pankaj Garg10-May-08 0:41
Pankaj Garg10-May-08 0:41 
AnswerRe: pie chart in c# Pin
Abhijit Jana10-May-08 1:04
professionalAbhijit Jana10-May-08 1:04 
GeneralRe: pie chart in c# Pin
Pankaj Garg10-May-08 1:19
Pankaj Garg10-May-08 1:19 
GeneralRe: pie chart in c# Pin
Abhijit Jana10-May-08 1:30
professionalAbhijit Jana10-May-08 1:30 
QuestionRe: pie chart in c# Pin
Pankaj Garg10-May-08 2:14
Pankaj Garg10-May-08 2:14 
AnswerRe: pie chart in c# Pin
Abhijit Jana10-May-08 2:22
professionalAbhijit Jana10-May-08 2:22 
Questionproblem with Simple style combobox Pin
Member 41292189-May-08 22:55
Member 41292189-May-08 22:55 
AnswerRe: problem with Simple style combobox Pin
Abhijit Jana9-May-08 23:40
professionalAbhijit Jana9-May-08 23:40 
GeneralRe: problem with Simple style combobox Pin
Member 412921812-May-08 23:23
Member 412921812-May-08 23:23 
GeneralRe: problem with Simple style combobox Pin
Member 412921819-May-08 22:40
Member 412921819-May-08 22:40 
QuestionAssemblies Pin
MrColeyted9-May-08 22:23
MrColeyted9-May-08 22:23 
AnswerRe: Assemblies Pin
Abhijit Jana9-May-08 22:36
professionalAbhijit Jana9-May-08 22:36 

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.