Any pointer as to the easiest way to obtain a list of proptery names and values that are implemented in a .NET object. Basically all I want to is poulate a grid with the names and properties. Obviously I can write specific code for it but I have a load of different object so wanted to do something generic.
Object.GetType.GetProperties gets me an array of PropertyInfo.
PropertyInfo.Name gets me the name, .CanRead whther or not I can read it and .GetValue the value. What confuses me is how I deal with properties that have parameters. Can't seem to find anything too obvious on MSDN, but then I can only even find info I already know the answer to there.
Object.GetType.GetProperties gets me an array of PropertyInfo.
PropertyInfo.Name gets me the name, .CanRead whther or not I can read it and .GetValue the value. What confuses me is how I deal with properties that have parameters. Can't seem to find anything too obvious on MSDN, but then I can only even find info I already know the answer to there.


Comment