Cra*_*rer 2 .net c# .net-3.5 code-snippets
这是一个有趣的谜题.
我下载了Snippet Compiler来尝试一些东西,并想编写以下代码:
using System;
using System.Collections.Generic;
public class MyClass
{
public static void RunSnippet()
{
HashSet<int> h = new HashSet<int>();
}
}
Run Code Online (Sandbox Code Playgroud)
但是上面的代码没有编译.我明白了:
"无法找到类型或命名空间名称'HashSet'(您是否缺少using指令或程序集引用?)"
显然,我不是.它似乎找不到HashSet,但它在Systems.Collections.Generic命名空间中找到其他类型(例如List,SortedDictionary).
对此有何解释?假设Snippet Compiler正在使用标准的Framework编译器......
我很想知道为什么这不起作用.
| 归档时间: |
|
| 查看次数: |
5064 次 |
| 最近记录: |