问题
Is there no System.Collections.Generic.HashSet on Windows Phone 7?
回答1:
The Windows Phone 7 .NET libraries are comparable to what is provided in Silverlight 3.0 (which doesn't have HashSet
). You can build something like a HashSet
using a Dictionary
. For example, see this MSDN forum post: http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/e1dd3571-dfb8-4abe-b63a-62106d6a4965/
回答2:
It is not supported on Windows Phone. Windows Phone version of Silverlight contains some parts of regular Silverlight but not all.
See here
回答3:
It is supported in SL4
HashSet(Of T) Class
However on Widows Phone 7, is compatible with Silverlight 3.0 API and SL 4 is not supported. So the answer is no, you can not use HashSet for Windows Phone 7 yet.
来源:https://stackoverflow.com/questions/4770785/hashsett-on-windows-phone-7