阅读背景:

从泛型方法返回null值

来源:互联网 

So i have this method:

所以我有这个方法:

    internal K GetValue<T, K>(T source, string col) where T : IBaseObject
    {
        string table = GetObjectTableName(source.GetType());
        DataTable dt = _mbx.Tables[table];
        DataRow[] rows = dt.Select("ID = " + source.ID);
        if (rows.Length == 0) return K;

        return (K) rows[0][col];
    }
    intern



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: