Parameters
- item
Library/Library.Test/TestOrdinalList.cs
C# | Copy Code |
---|---|
OrdinalList lista = new OrdinalList(new int[] { 0 }); OrdinalList listb = (OrdinalList) ((ICloneable) lista).Clone(); Assert.IsFalse(ReferenceEquals(lista, listb)); Assert.AreEqual(lista.Count, listb.Count); Assert.IsTrue(listb.Contains(0)); listb.Add(1); Assert.IsTrue(listb.Contains(1)); Assert.IsFalse(lista.Contains(1)); |
VB.NET | Copy Code |
---|---|
Dim lista As New OrdinalList(New Integer() {0}) Dim listb As OrdinalList = DirectCast((DirectCast(lista, ICloneable)).Clone(), OrdinalList) Assert.IsFalse(ReferenceEquals(lista, listb)) Assert.AreEqual(lista.Count, listb.Count) Assert.IsTrue(listb.Contains(0)) listb.Add(1) Assert.IsTrue(listb.Contains(1)) Assert.IsFalse(lista.Contains(1)) |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7