TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Poul Christiansen
NA
8
3.1k
How to get instance reference
Sep 1 2011 7:26 PM
Hy
I have a class like this:
public class myClass
{
public string fieldA;
public Datatime fieldB;
...
}
I would like to be able to provide a property kind of like this:
public List<object> Fields
{
get
{
}
}
that returns the actual fields of the instance - not "just" the value.
I can enumerate them using reflection, but I cannot seem to get from the FieldInfo object to the actual fueld on the instance.
The class is not sealed and I would like my Fields property to return the fields added in inherited classes also - if possible.
any feedback on how to proceed?
Best regards
Poul Lindholm Christiansen
Reply
Answers (
7
)
how can i get multiple columns value from dropdown list ?
Define Primarykey with Indexproperty