HighTechTalks DotNet Forums  

reflection

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss reflection in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Rain
 
Posts: n/a

Default reflection - 09-05-2006 , 07:06 AM






Hi, i need help please.. any help would be greatly appreciated. I need to
know how i can get the value of a property throught reflection in C#? please
please.. thanks in advance...


Reply With Quote
  #2  
Old   
Bryan
 
Posts: n/a

Default RE: reflection - 10-11-2006 , 12:54 PM






Something like this:

TextBox tb = new TextBox();
PropertyInfo pi = tb.GetType().GetProperty("Text");
string s = (string)pi.GetValue(tb, null);

Hope that helps.


"Rain" wrote:

Quote:
Hi, i need help please.. any help would be greatly appreciated. I need to
know how i can get the value of a property throught reflection in C#? please
please.. thanks in advance...


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.