|
-
May 10th, 2007, 06:17 AM
#1
Thread Starter
Hyperactive Member
[2.0] Dynamic Generic List<T>
Hi all,
I have a situation such that it is only at run time that i would know what type of generic list i want to create. Therefore I need something like:
Private List<IBase> Test(IBase myObj) // where IBase is a base class which all others inherit
{
Type myType = GetType(myObj)
Return new List<myType>;
}
I know the code above is rubbish, its just to give you an idea of what i want to achieve. Any ideas???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|