1. 程式人生 > >c# 反射打開窗臺 可根據命名空間來做權限

c# 反射打開窗臺 可根據命名空間來做權限

強制轉換 user sem eat ont sof exec for nbsp

Assembly assembly = Assembly.GetExecutingAssembly();
// 實例化窗體

//UserControl 可根據窗體或者控件來更改

//as UserContro 強制轉換。
UserControl form = assembly.CreateInstance("TernSoftwareForm.UserIndexPage") as UserControl;

c# 反射打開窗臺 可根據命名空間來做權限