Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Drawing;
- using System.Windows.Forms;
- using System.Reflection;
- public class ControlList {
- static public void Main() {
- Assembly controls = Assembly.GetAssembly(typeof(Control));
- int count = 0;
- foreach (var type in controls.GetTypes()) {
- if (type.IsSubclassOf(typeof(Control))) {
- count++;
- Console.WriteLine(type.Name);
- }
- }
- Console.Write("Total " + count + " controls. Press any key to exit..");
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement