Lines Matching refs:list

14  *    notice, this list of conditions and the following disclaimer.
16 * notice, this list of conditions and the following disclaimer in the
47 public static bool add( this IList list, object value )
49 int count = list.Count;
50 list.Add( value );
51 return list.Count == count + 1;
55 public static void add<T>( this ICollection<T> list, T value )
57 list.Add( value );
61 public static void add<T>( this List<T> list, T value )
63 list.Add( value );
67 public static void add( this IList list, int index, object value )
69 list.Insert( index, value );
73 public static void addAll( this List<object> list, IEnumerable items )
75 list.AddRange( items.Cast<object>() );
79 public static void addAll( this IList list, IEnumerable items )
82 list.Add( item );
85 public static void addAll<T>( this ICollection<T> list, IEnumerable<T> items )
88 list.Add( item );
93 public static void addElement( this List<object> list, object value )
95 list.Add( value );
99 public static void clear( this IList list )
101 list.Clear();
105 public static bool contains( this IList list, object value )
107 return list.Contains( value );
111 public static bool contains<T>( this ICollection<T> list, T value )
113 return list.Contains( value );
117 public static T elementAt<T>( this IList<T> list, int index )
119 return list[index];
123 public static object get( this IList list, int index )
125 return list[index];
129 public static T get<T>( this IList<T> list, int index )
131 return list[index];
136 public static T get<T>( this List<T> list, int index )
138 return list[index];
142 public static object remove( this IList list, int index )
144 object o = list[index];
145 list.RemoveAt( index );
150 public static void remove<T>( this IList<T> list, T item )
152 list.Remove( item );
156 public static void set( this IList list, int index, object value )
158 list[index] = value;
162 public static void set<T>( this IList<T> list, int index, T value )
164 list[index] = value;
168 public static void set<T>( this List<T> list, int index, T value )
170 list[index] = value;
174 public static void setSize<T>( this List<T> list, int size )
176 if ( list.Count < size )
178 list.AddRange( Enumerable.Repeat( default( T ), size - list.Count ) );
180 else if ( list.Count > size )
182 list.RemoveRange(size, list.Count - size);
200 public static int size<T>( this List<T> list )
202 return list.Count;
206 public static IList subList( this IList list, int fromIndex, int toIndex )
208 return new SubList( list, fromIndex, toIndex );
210 // list
217 public static IList<T> subList<T>( this IList<T> list, int fromIndex, int toIndex )
219 return new SubList<T>( list, fromIndex, toIndex );
221 // list
227 public static IList<T> subList<T>( this List<T> list, int fromIndex, int toIndex )
229 return new SubList<T>( list, fromIndex, toIndex );
231 // list