Create list of variable type

Posted by Jan on Stack Overflow See other posts from Stack Overflow or by Jan
Published on 2010-03-22T14:59:00Z Indexed on 2010/03/22 15:01 UTC
Read the original article Hit count: 304

Filed under:
|

I am trying to create a list of a certain type.

I want to use the List notation but all I know is a "System.Type"

The type a have is variable. How can I create a list of a variable type?

I want something similar to this code.

public IList createListOfMyType(Type myType)
{
     return new List<myType>();
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about lists