I have a generic business object collection class which contains some business objects:
public abstract class BusinessObjectCollection<T> : ICollection<T>
where T : BusinessObject
I want to write a method on my Collection class that returns the type T and a method that returns a newly-instantiated object of type T.
In C++, this would be where you simply declare a typedef value_type T;
and use BusinessObjectCollection::value_type but I can't find an equivalent in C#.
Any suggestions?
EDIT: Thanks everyone. One close parallel to the typedef I was thinking of is the method:
Type GetGenericParameter() { return typeof(T); }