¡@

Home 

c# Programming Glossary: removeat

Should I always return IEnumerable<T> instead of IList<T>?

http://stackoverflow.com/questions/1072614/should-i-always-return-ienumerablet-instead-of-ilistt

in IEnumerable T IndexOf T item Insert int index T item RemoveAt int index and Properties T this int index get set If you need..

ObservableCollection element-wise Transform/Projection Wrapper

http://stackoverflow.com/questions/13920703/observablecollection-element-wise-transform-projection-wrapper

null e.OldItems.Count 1 break m_TransformedCollection.RemoveAt e.OldStartingIndex return case NotifyCollectionChangedAction.Replace.. value throw new InvalidOperationException public void RemoveAt int index throw new InvalidOperationException #endregion IList..

Observable Stack and Queue

http://stackoverflow.com/questions/3127136/observable-stack-and-queue

as an Insert at offset 0 and pop as returning index 0 then RemoveAt index 0 or with a queue you could just Add to the end of the.. item as with the stack for Dequeue . The Insert Add and RemoveAt operations would be called on the underlying ObservableCollection..

How to implement a ConfigurationSection with a ConfigurationElementCollection

http://stackoverflow.com/questions/3935331/how-to-implement-a-configurationsection-with-a-configurationelementcollection

BaseGet index set if BaseGet index null BaseRemoveAt index BaseAdd index value public void Add ServiceConfig serviceConfig.. serviceConfig BaseRemove serviceConfig.Port public void RemoveAt int index BaseRemoveAt index public void Remove string name.. serviceConfig.Port public void RemoveAt int index BaseRemoveAt index public void Remove string name BaseRemove name The part..

Is there a performance difference between these two algorithms for shuffling an IEnumerable?

http://stackoverflow.com/questions/4412405/is-there-a-performance-difference-between-these-two-algorithms-for-shuffling-an

index random.Next copy.Count yield return copy index copy.RemoveAt index They are basically identical except one uses a List and.. second version will probably be a bit slower because of RemoveAt. Lists are really arrays that grow when you add elements to.. and removal in the middle is slow in fact MSDN states that RemoveAt has an O n complexity . Anyway the best would be to simply use..

Remove element of a regular array

http://stackoverflow.com/questions/457453/remove-element-of-a-regular-array

second element of the array I need something similar to RemoveAt but for a regular array. c# .net arrays share improve this.. don't want to use List var foos new List Foo array foos.RemoveAt index return foos.ToArray You could try this extension method.. method that I haven't actually tested public static T RemoveAt T this T source int index T dest new T source.Length 1 if index..

No ConcurrentList<T> in .Net 4.0?

http://stackoverflow.com/questions/6601611/no-concurrentlistt-in-net-4-0

and provide random read only access by index but no Insert RemoveAt etc. and also no random write access . This was the goal of..

How to Quickly Remove Items From a List

http://stackoverflow.com/questions/6926554/how-to-quickly-remove-items-from-a-list

T . The documentation states that the List.Remove and List.RemoveAt operations are both O n List.Remove List.RemoveAt This is severely.. and List.RemoveAt operations are both O n List.Remove List.RemoveAt This is severely affecting my application. I wrote a few different.. i 0 i size i myList.Add i.ToString return myList Test 1 RemoveAt Here is the test I used to test the RemoveAt method. private..