locked
Is there a way to get methods names using "Reflection" from a System.Reflection.Assembly DLL? RRS feed

  • Question

  • Hi All

    I wonder if is  there a way to get methods names from a System.Reflection.Assembly DLL?

    i just did it with a System.Reflection.RuntimeAssembly DLL and this is mi code:

            Type type;
            Assembly MathX;
            object myInstance;

                string filename = @"myMath.dll";

                //Load DLL
                MathX = Assembly.LoadFrom(filename);
                //Get class type

                type = MathX.GetTypes()[0];

                //Load Dll class methods into an array
                MethodInfo[] myArrayMethodInfo = type.GetMethods(BindingFlags.Public | BindingFlags.Instance |                   BindingFlags.DeclaredOnly);

    This code works great with a System.Reflection.RuntimeAssembly DLL but when i try to load a System.Reflection.Assembly DLL in the same way it does not work

    Thursday, January 21, 2016 5:16 PM

Answers