Button, through a long chain of inheritance, inherits from a class Componentthat implements IDisposableand has a method void Dispose(). This is the method you get through
assembly.GetModules()[0].GetTypes()[300].GetMethods()[362];
Component, System, , (System.Windows.Forms) .
, , BindingFlags.DeclaredOnly:
var allMethods = type.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
, , Button, - , .
- :
Assembly assembly = Assembly.LoadFrom(@"C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Windows.Forms.dll");
var module = assembly.GetModules()[0];
var type = module.GetTypes()[300];
var allMethods = type.GetMethods().Where(c => c.Module == module).ToArray();