判断程序集中是否有某个类
//这个函数可判断程序集中是否有某个类
public class ClassManager
{
public bool ExsistClass(string classname)
{
System.Reflection.Assembly a= System.Reflection.Assembly.GetEntryAssembly();
Type[] classes = a.GetTypes();
foreach( Type c in classes)
{
if(c.ToString().ToLower().EndsWith(classname.ToLower()))
{
MessageBox.Show(c.ToString());
return true;
}
}
return false;
}
}



浙公网安备 33010602011771号