Windows Phone 7 上没有 System.Collections.Generic.HashSet 吗?
Windows Phone 7 上没有 System.Collections.Generic.HashSet 吗?
Windows Phone 7的.NET库与Silverlight 3.0中提供的类似(Silverlight 3.0中没有HashSet
)。您可以使用Dictionary
构建类似于HashSet
的数据结构。例如,可以参考此MSDN论坛帖子:http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/e1dd3571-dfb8-4abe-b63a-62106d6a4965/
它在SL4中得到支持。
然而,在Windows Phone 7上,它与Silverlight 3.0 API兼容,不支持SL4。所以答案是否定的,你还不能在Windows Phone 7上使用HashSet。