I have loaded an assembly called ‘Mscorlib.dll’ and i wanted it to list all classes within the ‘Mscorlib’, which it does(using reflection). Now I want to add a function whereby the user inputs a class from the assembly and it gets all the methods from that class.
How would i go around doing this? Any help would be nice
Use
Assembly.GetType(type)to get the appropriateType, thenType.GetMethodsto get the methods within it. (Note that the overload which doesn’t take aBindingFlagswill only return public methods.)For example (no error checking):