How to get the underlying type of an Observable collection using reflection?
Consider following classes:
public class Order
{
public int OrderID { get; set; }
public string OrderDetails { get; set; }
}
public class Orders : ObservableCollection<Order>
{
}
Any Ideas?
You could use the GetGenericArguments method. Supposing you have an instance of
Orders: