![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | why doesn't System.Collections.SortedList work in PowerShell I'm doing this in CTP2 and the properties don't return any results. $a = new-object System.Collections.SortedList $a.add((get-date),1) $a.add([datetime]'12/31/2009',2) gm -in $a TypeName: System.Collections.SortedList Name MemberType Definition ---- ---------- ---------- Add Method System.Void Add(Object key, Object value) Clear Method System.Void Clear() Clone Method System.Object Clone() Contains Method System.Boolean Contains(Object key) ContainsKey Method System.Boolean ContainsKey(Object key) ContainsValue Method System.Boolean ContainsValue(Object value) CopyTo Method System.Void CopyTo(Array array, Int32 arrayIndex) Equals Method System.Boolean Equals(Object obj) GetByIndex Method System.Object GetByIndex(Int32 index) GetEnumerator Method System.Collections.IDictionaryEnumerator GetEnumerator() GetHashCode Method System.Int32 GetHashCode() GetKey Method System.Object GetKey(Int32 index) GetKeyList Method System.Collections.IList GetKeyList() GetType Method System.Type GetType() GetValueList Method System.Collections.IList GetValueList() IndexOfKey Method System.Int32 IndexOfKey(Object key) IndexOfValue Method System.Int32 IndexOfValue(Object value) Remove Method System.Void Remove(Object key) RemoveAt Method System.Void RemoveAt(Int32 index) SetByIndex Method System.Void SetByIndex(Int32 index, Object value) ToString Method System.String ToString() TrimToSize Method System.Void TrimToSize() Item ParameterizedProperty System.Object Item(Object key) {get;set;} Capacity Property System.Int32 Capacity {get;set;} Count Property System.Int32 Count {get;} IsFixedSize Property System.Boolean IsFixedSize {get;} IsReadOnly Property System.Boolean IsReadOnly {get;} IsSynchronized Property System.Boolean IsSynchronized {get;} Keys Property System.Collections.ICollection Keys {get;} SyncRoot Property System.Object SyncRoot {get;} Values Property System.Collections.ICollection Values {get;} gm -in $a.keys Get-Member : No object has been specified to get-member. At line:1 char:3 + gm <<<< -in $a.keys gm -in $a.count Get-Member : No object has been specified to get-member. At line:1 char:3 + gm <<<< -in $a.count |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Initializing a generic SortedList with sorted data | .NET General | |||
| System restore and other system apps do not work | Vista General | |||
| System.Collections.Generic.List<int> myList = new System.Collections.Generic.List<int>(100); | .NET General | |||
| Generics and collections | .NET General | |||
| How to put PSObject into System.Collections.ObjectModel.Collection | PowerShell | |||