System.Collections.SortedList.GetValueList C# (CSharp) Method

GetValueList() public method

public GetValueList ( ) : IList
return IList
        public virtual IList GetValueList()
        {
            if (_valueList == null) _valueList = new ValueList(this);
            return _valueList;
        }

Same methods

SortedList::GetValueList ( ) : System.Collections.IList

Usage Example

Beispiel #1
0
        public void TestGetKeyValueList()
        {
            var dic1 = new SortedList();

            for (int i = 0; i < 100; i++)
                dic1.Add("Key_" + i, "Value_" + i);

            var ilst1 = dic1.GetKeyList();
            var hsh1 = new Hashtable();

            DoIListTests(dic1, ilst1, hsh1, DicType.Key);

            Assert.False(hsh1.Count != 2
                || !hsh1.ContainsKey("IsReadOnly")
                || !hsh1.ContainsKey("IsFixedSize"), "Error, KeyList");


            dic1 = new SortedList();
            for (int i = 0; i < 100; i++)
                dic1.Add("Key_" + i, "Value_" + i);

            ilst1 = dic1.GetValueList();
            hsh1 = new Hashtable();
            DoIListTests(dic1, ilst1, hsh1, DicType.Value);

            Assert.False(hsh1.Count != 2
                || !hsh1.ContainsKey("IsReadOnly")
                || !hsh1.ContainsKey("IsFixedSize"), "Error, ValueList");
        }
All Usage Examples Of System.Collections.SortedList::GetValueList