How to get the Property Name as a string?

Posted by Varaprasadm.84 under C# on 12/3/2012 | Points: 10 | Views : 1470 | Status : [Member] | Replies : 2
Hi,

How to get the Property Name as a string?

For example:


Public int PropertyValue{get;set;}


Now i want to get the PropertyValue as a string with out reflection and with out looping through foreach PropertyInfo

Vara Prasad.M


Responses

Posted by: lakhansin-22735 on: 7/9/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

As you have declared property type is 'INT', then what is the need where you have required a return value would be a 'string'?

Lakhan Singh
Tech Lead
BeyondKey System Pvt. Ltd.
Indore, M.P.
India

Varaprasadm.84, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Varaprasadm.84 on: 7/18/2013 [Member] Starter | Points: 25

Up
0
Down
As i have declared it as "INT" i can use the property as an integer, but now my question is not the return value i want the declared property name.

Vara Prasad.M

Varaprasadm.84, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response