Enum & overload & Reflection
来源:互联网 发布:seo闪电精灵怎么样 编辑:程序博客网 时间:2024/06/03 22:44
public enum dx:int
{
dx1 = 1,
dx2 = 2,
dx3 = 3,
dx4 = 4
}
class Class3
{
public void Fun(dx x)
{
MessageBox.Show("1_"+((int)x).ToString());
}
public void Fun(string x, string y)
{
MessageBox.Show("2_"+x + y);
}
public void Fun(string x,int y)
{
MessageBox.Show("3_"+x+y.ToString() );
}
}
//Reflection:
object obj = System.Activator.CreateInstance(t);
System.Reflection.MethodInfo mi = t.GetMethod("Fun1");
string str = mi.Invoke(obj, new object[] { "1", 2 }) as string;
- Enum & overload & Reflection
- Reflection
- Reflection
- Reflection
- Reflection
- Reflection
- Reflection
- Reflection
- Reflection
- overload
- Overload
- Overload
- Overload
- enum
- enum
- enum
- enum
- enum
- RAISERROR 提示变量问题
- RedHat(CentOS)和Ubuntu安装软件命令对比(区别)
- Windows CE之USB驱动基本概念
- 两台SQL Server数据同步解决方案
- 构建ASP.NET网站十大必备工具
- Enum & overload & Reflection
- android之Pull解析XML
- c++类型重载 : 避免对指针和数字重载
- 混合运行库
- cookie JS验证码
- Scala By Example: Case 类与模式匹配
- 从Homography矩阵得到旋转和平移量(From Homography to Rotation and Translation)
- 解决安装VC6.0的问题—you must first run the installation wizard before running the setup
- spring3 web mvc framework