public class Car<TFirst,TSecond>
{
public TFirst First { get; }
public TSecond Second { get; }
public Car(TFirst first, TSecond second) => (First, Second) = (first, second);
}
//传入类型和参数即可
var benci = new Car<string,int>("奔驰",23);
Debug.Log(benci.First+benci.Second);