[c#] 간단한 Generic List

    public class GenericList<T>
    {
        private class Node
        {
            private Node next;
            private T data;
            public Node(T t)
            {
                next = null;
                data = t;
            }
            public Node Next
            {
                get { return next; }
                set { next = value; }
            }
            public T Data
            {
                get { return data; }
                set { data = value; }
            }
        }

        private Node head;
        public GenericList()
        {
            head = null;
        }

        public void Add(T t)
        {
            Node n = new Node(t);
            n.Next = head;
            head = n;
        }

        public IEnumerator<T> GetEnumerator()
        {
            Node current = head;
            while (current != null)
            {
                yield return current.Data;
                current = current.Next;
            }
        }
    }

 

private 클래스 Node 와 그를 이용한 IEnummerator 구현 –> 제네릭 리스트 구현

 

참고 : (미친바바’s)  http://blog.naver.com/baba1092?Redirect=Log&logNo=130093943245

Yamecoder 야매코더_
C# 2010. 12. 6. 11:31

댓글을 달아 주세요

  1. 이전 댓글 더보기
  2. BlogIcon wholesale nba jerseys 2014.11.16 15:46  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  3. BlogIcon mont blanc starwalker 2014.11.20 03:29  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  4. 匿名 2014.12.03 05:44  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  5. 匿名 2014.12.03 05:44  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  6. BlogIcon Dallas Cowboys Jerseys 2014.12.27 08:16  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  7. BlogIcon moncler jassen heren outlets at anthem 2014.12.28 13:52  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  8. BlogIcon 优质820型角驰压瓦机 2015.01.02 19:48  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  9. 匿名 2015.01.14 18:27  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  10. 匿名 2015.01.15 12:20  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  11. BlogIcon All Star Jerseys 2015.01.29 01:34  수정/삭제  댓글쓰기

    버히Philadelphia Phillies Jerseys ,Los Angeles Lakers JerseysIndiana Pacers Jerseys Jacksonville Jaguars Jerseys Dallas Stars Jerseys



    Running back Ahmad Bradshaw was also making his debut after having his 2013 season end after Week 3,2014 All Star Jerseys Seattle,Seattle Mariners Jerseys,Houston Oilers Jerseys NFL Lo.

    Carrasco's strong stretch began with five scoreless innings against the 의전

  12. BlogIcon Wholesale Nhl Jerseys Free Shipping 2015.01.29 18:18  수정/삭제  댓글쓰기

    표를Minnesota Vikings Jerseys Olympic Russia Jerseys cheap ,Notre Dame Fighting Irish Jer,St Louis Blues JerseysLos Angeles Lakers jerseys nfl jerseys clearance

    This isn’t an overreaction because,Miami Dolphins Jerseys 2014 n, simply,Houston Colts Jerseys New Yor, the conference’s best hopes just blew it in their biggest nonconference tests. The ink ran dry in their attempts at signature wins. It’뉴지

  13. BlogIcon Houston Texans Jerseys 2015.01.29 18:19  수정/삭제  댓글쓰기

    리이cheap mlb jerseys Lower Merion Jerseys Atlanta Braves Jerseys san francisco 49ers hats
    ,Wholesale Nba Jerseys Paypal ,Dallas Cowboys Hats
    Deon Newsome went 22 yards on an end around and Rogers gained 17 more on a reverse on which he faked a pass and then picked his way downfield,Cheap Ncaa Jerseys cheap Memp,New York Americans Jerseys,Wholesale Ncaa Jerseys.

    White Sox: OF Avisail Garcia got 드전

  14. 匿名 2015.02.11 14:03  수정/삭제  댓글쓰기

    일니永恒之塔服务端传奇服务端密传-服务端QQ西游私服务端天堂1私服务端

    千年服务端蜀门服务端征途服务端机战服务端神泣服务端醉西游服务端

    天堂I服务端挑战OL服务端剑侠情缘-服务端奇侠XIAH服务端挑战服务端


    传世开私服一条龙服务-

    传奇开私服一条龙开区服务-


    传奇广告代理-

    IDC服务器以及空间租用-

    魔兽世界sf开服一条龙服务-


    客服咨询QQ(企鹅扣扣)1285574370

    Email:1285574370@qq.com

    更多商业版本免费开放下载




    天恒科技1.95皓月终极12星座道士加强升级版



    天恒科技1.85荣耀必杀极限之地广寒宫泡点元素PK版



    天恒科技1.85无特戒无英雄轻中变魔神唯我独尊麻痹宝宝



    天恒科技独家1.85恶魔世界装备分身15转八钻靓装元素中变版어이

  15. BlogIcon duffle coat burberry femme soldes 2015.03.27 21:10  수정/삭제  댓글쓰기

    단뉴La loi ne peut tre chang&eacute;, les r&eacute;sultats en g&eacute;n&eacute;ral. le d&eacute;veloppement et la short burberry coop&eacute;ration gagnant - gagnant, c'est le duffle coat burberry concept. loin de la pointe, "la recherche moderne Nanming historique,Staline sur sc&egrave;ne, Dieu toilettes Zi Gu est une d&eacute;esse,Par exemple, | | 1923.
    dans l'histoire de la Chine est toutefois, 할리

  16. BlogIcon sac burberry homme? 2015.03.31 00:03  수정/삭제  댓글쓰기

    니지le Parlement turc par la loi contre l'expansion de la police de la / des pouvoirs du Parlement internationalturkish satellite artificiel par la loi contre l'&eacute;largissement de La police / Satellite Satellite international cr&eacute;&eacute;: source de mise &agrave; jour: 2015-03-27 15 Classification: 36 H 14: information des mots - cl&eacute;s: anti - objection,La Turquie a de nombreuses prot일가

  17. 匿名 2015.03.31 08:50  수정/삭제  댓글쓰기

    단서Important Safety Precautions:






    Few have left thoughts about the current collection. Moncler is not for everyone because not everyone can come from the look of nyloned painted in a bright color, but there are some interesting pieces.



    Prices: Online retailers and storefronts purchase their products from the same manufacturers. However, an online retailer doesn't have the costly ov를분

  18. 匿名 2015.04.01 06:28  수정/삭제  댓글쓰기

    일일presents the visible face of cloud computing that most people have already experienced. The advantages of web-based applications such as Gmail, Twitter, and Facebook are pretty obvious - there's nothing to download to your PC, you can access them from anywhere, they're constantly being enhanced and every time updates are made they become instantly available to any user when they next login.



    가알

  19. 匿名 2015.04.03 13:49  수정/삭제  댓글쓰기

    립다In fact, AIRMAX and not stand still, today we join in the use of special powers of the Nike Air Max 2009 sale, AIRMAX identification of a new era to create. Nike Air Max 2009 sale, the use of a feature of the technology of today's most ardent Flywire.



    Although the use of new technologies and maintaining AIRMAX traditional shoe design line of the body, new technology and tradition in the col는종

  20. 匿名 2015.04.03 17:37  수정/삭제  댓글쓰기

    종다火车采集器html简单模板示范







    Consider the rules of the road and regulations in different regions and adapt your riding style accordingly. Be sure to stay away from narrow roads and choose less populated roads to travel on. Once you have decided on a route and stop overs its time to inspect your bike. Do this before packing it to ensure you don't miss anything. The Motorcycle Safety Foundation su우시

  21. 匿名 2015.04.04 02:54  수정/삭제  댓글쓰기

    되정In fact, AIRMAX and not stand still, today we join in the use of special powers of the Nike Air Max 2009 sale, AIRMAX identification of a new era to create. Nike Air Max 2009 sale, the use of a feature of the technology of today's most ardent Flywire.



    Although the use of new technologies and maintaining AIRMAX traditional shoe design line of the body, new technology and tradition in the col이우

Powerd by Tistory, designed by criuce
rss