Torna al Thread

Assembly assembly = Assembly.LoadFrom(txtDll.Text); Type[] tipi = assembly.GetTypes(); foreach (Type oggetto in tipi) { if (oggetto.BaseType == typeof(System.Windows.Forms.Form)) { Form frm = (Form)assembly.CreateInstance(oggetto.Name, true); PropertyInfo menu = oggetto.GetProperty("Mostra_Menu"); bool mn = (bool)menu.GetValue(frm, null); <----- Genera Eccezzione if (mn) { ........ } } }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5