文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>如何取得 Func 对象 字段

如何取得 Func 对象 字段

时间:2011-05-14  来源:林松斌

namespace ConsoleApplication2
{
    class Program
    {
        class Customer
        {
            public int id;
            public string name;
        }

        class Helper<T>
        {
            public void OrderBy<TKey>(Func<T, TKey> keySelector)
            {
                //Type t = typeof(TKey);
                //var b = t.GetProperties();
                //Type t = keySelector.GetType();
                //var k = keySelector.GetInvocationList();
                //var p = t.GetProperties();
                //在这里我如何取得 是 Customer id 这个字段 ??
                throw new NotImplementedException();
            }
        }

        static void Main(string[] args)
        {
            Helper<Customer> h = new Helper<Customer>();
            h.OrderBy(p => p.id);

            Console.Read();
        }

    }
}

相关阅读 更多 +
排行榜 更多 +
突围血战 v5.0.0 安卓版

突围血战 v5.0.0 安卓版

休闲益智 下载
无限都市乱斗 v2.0.3 安卓版

无限都市乱斗 v2.0.3 安卓版

飞行射击 下载
无限都市乱斗 v2.0.3 安卓版

无限都市乱斗 v2.0.3 安卓版

飞行射击 下载