Parameters
- index
Library/Library.Test/TestSetList.cs
C# | Copy Code |
---|---|
MyValue one = new MyValue(1); MyValue two = new MyValue(2); SetList<MyValue> set = new SetList<MyValue>(); set.Add(one); set.Add(two); Assert.AreEqual(2, set.Count); Assert.IsTrue(Object.ReferenceEquals(one, set[0])); Assert.IsTrue(set.ReplaceAll(new MyValue[] { new MyValue(1), new MyValue(3) })); Assert.IsFalse(Object.ReferenceEquals(one, set[0])); Assert.AreEqual(3, set.Count); |
VB.NET | Copy Code |
---|---|
Dim one As New MyValue(1) Dim two As New MyValue(2) Dim [set] As New SetList(Of MyValue)() [set].Add(one) [set].Add(two) Assert.AreEqual(2, [set].Count) Assert.IsTrue([Object].ReferenceEquals(one, [set](0))) Assert.IsTrue([set].ReplaceAll(New MyValue() {New MyValue(1), New MyValue(3)})) Assert.IsFalse([Object].ReferenceEquals(one, [set](0))) Assert.AreEqual(3, [set].Count) |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
SetList<T> ClassSetList<T> Members