文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
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();
        }

    }
}

相关阅读 更多 +
排行榜 更多 +
战术任务

战术任务

飞行射击 下载
愤怒的兽人战争安卓版

愤怒的兽人战争安卓版

冒险解谜 下载
粉碎射手跑安卓版

粉碎射手跑安卓版

冒险解谜 下载