1: using System; 2: using System.Collections.Generic; 3: using System.Linq; 4: using System.Text; 5: using System.Data; 6: using System.Data.SqlClient; 7: using System.Reflection; 8: 9: namespace DAL 10: { 11: public class SqlHelper 12: { 13: private…
class TestOne { public String[] arr = { "1", "2", "3" }; public class Student { public int Id { get; set; } public string Name { get; set; } public String Code { get; set; } } public Expression<Func<Student, bool>>…
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Reflection; namespace WindowsFormsApplication8 { publ…
C#反射中的MakeGenericType函数可以用来指定泛型方法和泛型类的具体类型,方法如下面代码所示这里就不多讲了,详情看下面代码一切就清楚了: using System; using System.Reflection; namespace RFTest { //类ReflectionTest中定义了一个泛型函数DisplayType和泛型类MyGenericClass class ReflectionTest { //泛型类MyGenericClass有个静态函数DisplayNeste…