在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
//获得类所在的程序集名称(此处我选择当前程序集)
string bllName = System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().Location);
//获得类名(我此处是提前写入Button的Name属性)
string className = (sender as Button).Name;
//获得类全名,格式:WpfApplication.ToggleButton
string fullClassName = bllName + "." + className;
//根据类名称创建类实例
var bllObject = System.Reflection.Assembly.Load(bllName).CreateInstance(fullClassName);
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论