如何用代码获取System,System.Windows这些系统的命名空间下的类及方法呢?
Type tp = Type.GetType(“System.Math”);
tp.GetProperties(); tp.GetMethods();
这是某一具体类。
那System的呢?也就是我们写代码 .(点号)之后出现的提示内容要如何 用代码 获取呢)
Assembly as=Assembly.LoadWithPartialName("System");
Type[] t=as.GetTypes();
於黾:
Assembly as1 = Assembly.Load("System");
Type[] t = as1.GetTypes();
会提示:
System.IO.FileNotFoundException
HResult=0x80070002
Message=未能加载文件或程序集“System”或它的某一个依赖项。系统找不到指定的文件。
Source=mscorlib