FeedEnumComboBox<T>(ComboBoxEdit comboBox) where T : struct;
[解决办法] 泛型 FeedEnumComboBox<T>(ComboBoxEdit comboBox) where T : struct;
并限制T为struct类型 [解决办法]
我自己写的一个,希望对你有帮助
public T 方法名<T>(string procName, params DbParameter[] param) where T : 实体类
public 不用说了吧
T指的是你Model类中的实体类
括号里就是参数了
[解决办法]
跟非泛型方法比较一下就明白了 public T 方法名<T>(string procName, params DbParameter[] param) where T : 实体类 这个方法返回类型是T类型,括号里的参数就是调用该方法时需要提供的参数啊 不明白的话,想象一下非泛型方法 比如 public int myInt(string str,byte[] b),对照着去理解