public void Insert(IPlaylistItem item, int index) { if (index == 0) { Items.AddFirst(item); return; } var temp = Items.First; if (index > 0) { for (int i = 0; i < index; i++) { temp = temp.Next; } Items.AddBefore(temp, item); return; } throw new IndexOutOfRangeException(); }