| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| HashSet-1.0.0.dll | 2010-10-12 | 16.9 kB | |
| netcfhashset-src-1.0.0.zip | 2010-10-12 | 24.5 kB | |
| README.md | 2010-10-12 | 2.0 kB | |
| Totals: 3 Items | 43.4 kB | 1 | |
HashSet - HashSet implemetation which is missing in .NET CF
License
Apache License 2.0
Summary
An implementation of HashSet class in .NET that can be used in .NET Compact Framework (.NET CF), in which it is natively missing A small .NET library providing a handful of useful Enum functions which are missing from the .NET Compact Framework (CF.NET).
Key Features
- Parameterizable HashSet(Of T) implementation
- Modeled after the Java SE java.util.HashSet<E> class
Usage
Examples of basic usage of a HashSet(Of String):
-
Initialize a HashSet(Of String):
Dim strHs = New HashSet(Of String) Assert.AreEqual(strHs.Count, 0) -
Add an element:
Dim strHs = New HashSet(Of String) strHs.Add("first") Assert.IsTrue(strHs.Contains("first")) -
Remove an element:
Dim strHs = New HashSet(Of String) strHs.Add("first") strHs.Remove("first") Assert.IsFalse(strHs.Contains("first")) -
Clear elements:
Dim strHs = New HashSet(Of String) strHs.Add("first") strHs.Add("second") strHs.Add("third") Assert.AreEqual(strHs.Count, 3) strHs.Clear() Assert.AreEqual(strHs.Count, 0) -
Compare HashSets
Dim strHs1 = New HashSet(Of String) strHs1.Add("first") strHs1.Add("second") strHs1.Add("third") Dim strHs2 = New HashSet(Of String)(strHs1) Assert.IsTrue(strHs1 = strHs2) strHs2.Remove("second") Assert.IsTrue(strHs1 <> strHs2)
How to Build
This library and associated unit tests were developed in VS 2008 as Smart Device projects.
Releases
- 1.0
- 2010-10-12
- Initial release
Author: Albert Ho <albertho -at- kdsecure.com>
Copyright: (c) 2010 by KD Secure, LLC
NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK.