日期:2014-05-19  浏览次数:20757 次

谁来帮我看一下《C#2.0程序设计教程》中一个例题的错误呀
//程序清单P14_1.cs:
using   System;
using   System.Collections.Generic;

namespace   P14_1
{
        public   class   AssembleIteratorSample
        {
                static   void   Main()
                {
                        Assemble <int>   iAsm   =   new   Assemble <int> ();
                        iAsm.Add(4);
                        iAsm.Add(12);
                        iAsm.Add(9);
                        iAsm.Add(1);
                        iAsm.Add(8);
                        Console.WriteLine( "排序前: ");
                        foreach   (int   i   in   iAsm)
                                Console.WriteLine(i);
                        Console.WriteLine( "排序后: ");
                        foreach   (int   i   in   iAsm.SortedEnumerator())
                                Console.WriteLine(i);
                }
        }

        ///   <summary>
        ///   泛型类:   集合Assemble
        ///   </summary>
        public   class   Assemble <T>   :   IEnumerable <T>
                where   T   :   IComparable <T>
        {
                //字段
                protected   T[]   m_list;
                protected   int   m_count   =   0;
                protected   int   m_capacity   =   100;

                //属性
                public   int   Length
                {
                        get
                        {
                                return   m_count;
                        }
    &