Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. using System;
  2. using System.Drawing;
  3. using System.Windows.Forms;
  4. using System.Reflection;
  5.  
  6. public class ControlList {
  7.  
  8. static public void Main() {
  9.  
  10. Assembly controls = Assembly.GetAssembly(typeof(Control));
  11. int count = 0;
  12. foreach (var type in controls.GetTypes()) {
  13. if (type.IsSubclassOf(typeof(Control))) {
  14. count++;
  15. Console.WriteLine(type.Name);
  16. }
  17. }
  18.  
  19. Console.Write("Total " + count + " controls. Press any key to exit..");
  20. Console.ReadKey();
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement