Example #1
0
        static void Main(string[] args)
        {
            Account <string>       acc1 = new Account <string>("34");
            UniversalAccount <int> acc3 = new UniversalAccount <int>(450);
            UniversalAccount <int> acc2 = new UniversalAccount <int>(25);
            StringAccount          acc4 = new StringAccount("258");
            Account <string>       acc5 = new StringAccount("222");
            IntAccount <string>    acc6 = new IntAccount <string>(25)
            {
                Code = "gg258"
            };
            Account <int> acc7 = new IntAccount <long>(7)
            {
                Code = 258
            };
            MixedAccount <string, int> acc8 = new MixedAccount <string, int>("256")
            {
                Code = 111
            };
            Account <string> acc9 = new MixedAccount <string, int>("555")
            {
                Code = 22
            };

            Console.WriteLine(acc1.Id);
            Console.WriteLine(acc2.Id);
            Console.WriteLine(acc3.Id);
        }
Example #2
0
        public static void Display()
        {
            Account <string>       acc1 = new Account <string>("34");
            Account <int>          acc2 = new UniversalAccount <int>(45);
            UniversalAccount <int> acc3 = new UniversalAccount <int>(33);

            Console.WriteLine(acc1.Id);
            Console.WriteLine(acc2.Id);
            Console.WriteLine(acc3.Id);

            StringAccount    acc4 = new StringAccount("438767");
            Account <string> acc5 = new StringAccount("43875");

            Console.WriteLine(acc4.Id);
            Console.WriteLine(acc5.Id);

            IntAccount <string> acc7 = new IntAccount <string>(5)
            {
                Code = "r4556"
            };
            Account <int> acc8 = new IntAccount <long>(7)
            {
                Code = 4587
            };

            Console.WriteLine(acc7.Id);
            Console.WriteLine(acc8.Id);

            MixedAccount <string, int> acc9 = new MixedAccount <string, int>("456")
            {
                Code = 356
            };
            Account <string> acc10 = new MixedAccount <string, int>("9867")
            {
                Code = 35678
            };

            Console.WriteLine(acc9.Id);
            Console.WriteLine(acc10.Id);

            AccountWithClass <string> acc11 = new AccountWithClass <string>("34");
            AccountWithClass <string> acc12 = new UniversalAccountWithClass <string>("45");

            Console.WriteLine(acc11.Id);
            Console.WriteLine(acc12.Id);
        }