示例#1
0
        public static void VendorPublicItems()
        {
            Console.WriteLine("VendorPublicItems");

            VendorAssembly publicVendor = new VendorAssembly();

            publicVendor.AddNewItem();
        }
示例#2
0
        public static void VendorPrivateItems()
        {
            Console.WriteLine("VendorPrivateItems");

            Type vendorType = typeof(VendorAssembly);

            var            act = Activator.CreateInstance(vendorType);
            VendorAssembly pv  = (VendorAssembly)act;

            MethodInfo dMet = vendorType.GetMethod("AddNewItemPriv", BindingFlags.NonPublic | BindingFlags.Instance);

            dMet.Invoke(pv, null);
        }