[英]Template variables and the variables that can store template variables
有两个变量
basic<type1> type_1;
basic<type2> type_2;
我想要这两个变量来存储另一个这样的变量
basic<type1> type_1;
basic<type2> type_2;
var type = type_1 or type_2 // What type of variable should be declared?
谢谢。
您可以使用object
或dynamic
。
另外,如果basic<T>
继承自可以说basic
那么您将可以使用basic
作为变量类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.