How can I get a Types FieldInfos/PropertyInfos as a MemberInfo array in the order they are laid out in the class?
class Test
{
public bool First { get; set; }
public int Second;
public string Third { get; set; }
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
http://msdn.microsoft.com/en-us/library/ch9714z3.aspx
http://msdn.microsoft.com/en-us/library/kyaxdd3x.aspx
You would need to define order yourself, perhaps with attributes: