Possible Duplicate:
C# generic list <T> how to get the type of T?
This is a simple question. What is the most elegant and simple way to get the type of an ObservableCollection of unknown type?
I have a method:
public void DoSomething(object oc)
{
//I know 'oc' is a ObservableCollection<T>
//How to get its type <T> without having to do
//obj.GetType().GetProperties().....
}
Thanks