Unity中泛型<T>和泛型约束where 的使用_unity 泛型-CSDN博客泛型就是随便啥类型都行比如年龄有的是 string类型有的是int 类型为了减少判断就把 age当作string或者int中的类型 where则是约束类型参数的约束 - C# | Microsoft Learn