i have a class like below
public class Foo<T>
{
public List<T> Items{ get; set; }
}
and
i have a instance that above class,
Foo<Bar> bars = GetBars();
how i can get properties of Bar using reflection?
i try this
PropertyInfo[] properties = bars.Items.First().GetType().GetProperties();
but i think,its not good way,is there any better way do this?