Example #1
0
        static void Main(string[] args)
        {
            Dog d = new Dog();
            d[0] = "tudou";
            d[1] = "baicai";
            d[2] = "digua";
            for (var i = 0; i < d.Count;i++ )
            {
                Console.WriteLine(d[i]);
            }

            Console.WriteLine(d.Count);
            //Console.WriteLine(d[0]);

            foreach (var item in d)
            {
                Console.WriteLine(item);
            }
            Console.ReadLine();
        }
Example #2
0
 public OperatorClass(Dog d)
 {
     operD = d;
 }