Create List<> from runtime type

后端 未结 3 1693
别跟我提以往
别跟我提以往 2020-12-31 06:10

I am looking to create a List, where the type of T is several unrelated classes (with the same constructor arguments) that I know through reflection.

    Dat         


        
3条回答
  •  悲哀的现实
    2020-12-31 06:47

    You could... use List (if you know that your type is a reference type, or boxing is acceptable); or create a List via reflection.

    提交回复
    热议问题