C#反射中的一个核心类Type类
来源:互联网 发布:作图软件app文字 编辑:程序博客网 时间:2024/05/16 14:13
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
namespace _09反射中的一个核心类Type类
{
class Program
{
static void Main(string[] args)
{
Person p = new Person();
//1.获取Person类型的Type
//1.通过对象调用GetType()方法
Type type = p.GetType();
//2.通过typeof关键字
Type type1 = typeof(Person);
//3.通过程序集对象的GetType()方法
Assembly asm = Assembly.LoadFile(@"c:\testlib.dll");
Type typs = asm.GetType("命名空间.类型名");
}
}
public class Person
{
public string Name
{
get;
set;
}
public int Age
{
get;
set;
}
public string Email
{
get;
set;
}
}
}
- C#反射中的一个核心类Type类
- C#中的反射和Type类
- 【C#反射-Type类】
- C# 反射 Type Assembly类
- C# 反射 Type Assembly类
- C# 反射 Type Assembly类
- C#反射结合System.Type类实例
- C# 反射(一)Type类
- .NET反射 Type类
- 反射,System.Type类
- c# 类反射(type.gettype/typeof)和实例化
- c# 类反射(type.gettype/typeof)和实例化
- C# 核心语法-反射
- 反射中的Type
- C#反射调用另外一个类中的私有字段和方法
- 反射概述 和Type类
- 反射概述 和Type类
- 反射概述 和Type类
- (转)android面试1
- (转)android面试2
- 电影《白鹿原》观感
- 稍微冷门一点的经验,phpnow不能打开默认页的问题处理
- (转)android面试3
- C#反射中的一个核心类Type类
- CSS的display属性【转】
- v4l2驱动浅析
- linux 网络编程【三】 非阻塞通信select
- java阻塞队列BlockingQueue使用实例
- sqlite3常用命令&语法
- Oracle 11g 使用duplicate from active database 创建物理ADG
- Struts配置文件
- (转)andorid面试4