Get list of WinForms Controls from an assembly
Here is the sample code.
private void ShowControlsFromAssembly(string assemblyfile) { Assembly assembly = Assembly.LoadFrom(assemblyfile); Type[] et = assembly.GetExportedTypes(); foreach (Type t in et) { Form frm = (Form)assembly.CreateInstance( t.FullName); foreach (Control ctrl in frm.Controls) { listBox1.Items.Add(ctrl.Name); } } }
Related posts:























Leave a Reply
You must be logged in to post a comment.