// load assembly System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFrom(openFileDialog1.FileName); var settingsType = assembly.GetTypes(); foreach (var form in settingsType) { //var propList = form.GetProperties().Where(p => p.GetCustomAttributes(typeof(Aviation.Library.CS.Libs.TransactionAttribute), true).Length != 0).ToList(); var propList = form.GetProperties().ToList(); foreach (PropertyInfo btn in propList) { System.Reflection.PropertyInfo defaultProperty = form.GetProperty(btn.Name); object defaultObject = defaultProperty.GetValue(assembly, null); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)