Advertisement

07.14.2008 at 10:13AM PDT, ID: 23563358
[x]
Attachment Details

property.getvalue

Asked by PradeepYadhav in C# Programming Language

PropertyInfo myProperty = typeof(ClassName).GetProperty(stringproperty);

I am able to get the name

myProperty.Name

how to get the value of the property. I am having problems with the GetValue method, this is what I am trying


string propertyValue = string.Empty;
propertyValue = sourceProperty.GetValue(typeof(ClassName), null).ToString();
Start Free Trial
 
 
[+][-]07.14.2008 at 11:40AM PDT, ID: 22000739

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 01:51PM PDT, ID: 22001997

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C# Programming Language
Sign Up Now!
Solution Provided By: jaime_olivares
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.24.2008 at 06:20AM PDT, ID: 22300434

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 07:59PM PDT, ID: 22341995

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628