Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            EmployeeAllowances empdlg = new EmployeeAllowances();

            empdlg.ShowDialog();
            vFillEmpList();
        }
Ejemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            EmployeeAllowances dEmpAllowances = new EmployeeAllowances();
            Type myType = (typeof(Classes.AllowancesClass));

            // Get the public methods.
            MethodInfo[] myArrayMethodInfo = myType.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
            Console.WriteLine("\nThe number of public methods is {0}.", myArrayMethodInfo.Length);
            // Display all the methods.
            DisplayMethodInfo(myArrayMethodInfo, "1");
            // Get the nonpublic methods.
            MethodInfo[] myArrayMethodInfo1 = myType.GetMethods(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
            Console.WriteLine("\nThe number of protected methods is {0}.", myArrayMethodInfo1.Length);
            // Display information for all methods.
            DisplayMethodInfo(myArrayMethodInfo1, "2");
        }