Groups | Blog | Home
all groups > dotnet academic > september 2006 >

dotnet academic : reflection


Rain
9/5/2006 4:06:02 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...
Bryan
10/11/2006 9:54:01 AM
Something like this:

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

Hope that helps.


[quoted text, click to view]
AddThis Social Bookmark Button