微软自称非常高效,详情查看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);
        }
    }
}

相关文章:

  • 2021-07-27
  • 2021-12-05
  • 2021-07-06
  • 2022-01-18
  • 2022-02-15
  • 2021-12-08
  • 2022-02-08
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2021-07-19
  • 2021-09-17
  • 2021-12-08
  • 2021-12-05
  • 2021-11-17
  • 2021-04-10
相关资源
相似解决方案