Array of a generic class with unspecified type

前端 未结 8 728
长发绾君心
长发绾君心 2021-01-11 18:32

Is it possible in C# to create an array of unspecified generic types? Something along the lines of this:

ShaderParam<>[] params = new ShaderParam<&g         


        
8条回答
  •  别那么骄傲
    2021-01-11 18:49

    Rather late to the game, but here's how: http://www.codeproject.com/Articles/1097830/Down-the-Rabbit-Hole-with-Array-of-Generics

提交回复
热议问题