微软自称非常高效的HashSet

微软自称非常高效,详情查看MSDN
using System;
using System.Collections.Generic;

class Test
{
    
static void Main()
    {
        HashSet
<int> list = new HashSet<int>();
        
for (int i = 0; i < 5; i++)
        {
            list.Add(i);
        }

        
foreach (int i in list)
        {
            Console.WriteLine(i);
        }
    }
}
posted @ 2008-06-24 22:30  rapid  阅读(349)  评论(0编辑  收藏  举报