Example #1
0
        static void Main(string[] args)
        {
            //MyGeneric<int> numbers = new MyGeneric<int>();

            MyGeneric <User> users = new MyGeneric <User>();

            users.Add(new User()
            {
                Email    = "*****@*****.**",
                Password = "******",
                UserId   = 1,
                UserName = "******"
            });

            Dictionary

            Console.WriteLine(users.Count);
        }
Example #2
0
        static void Main(string[] args)
        {
            //    MyGeneric<int> myGeneric = new MyGeneric<int>();
            //    myGeneric.Add(5);


            MyGeneric <User> myGeneric = new MyGeneric <User>();

            myGeneric.Add(new User()
            {
                Avatar = "avatar",
                Email  = "*****@*****.**",
                Id     = 1
            });

            for (int i = 0; i < myGeneric.Count; i++)
            {
                //Console.WriteLine(myGeneric.list[i].ToString());
                Console.WriteLine(myGeneric[i].ToString());
            }

            Console.WriteLine(myGeneric[3].ToString());
        }