9 writes to head
System.Collections (9)
System\Collections\Generic\LinkedList.cs (9)
97head = result; 110head = newNode; 124head = result; 140head = node; 184head = null; 370head = null; 392head = newNode; 404head = null; 412head = node.next;
35 references to head
System.Collections (35)
System\Collections\Generic\LinkedList.cs (35)
56get { return head; } 61get { return head?.prev; } 95if (node == head) 108if (node == head) 117if (head == null) 123InternalInsertNodeBefore(head, result); 133if (head == null) 139InternalInsertNodeBefore(head, node); 148if (head == null) 154InternalInsertNodeBefore(head, result); 163if (head == null) 169InternalInsertNodeBefore(head, node); 176LinkedListNode<T>? current = head; 210LinkedListNode<T>? node = head; 217} while (node != head); 223LinkedListNode<T>? node = head; 236} while (node != head); 247} while (node != head); 255if (head == null) return null; 257LinkedListNode<T>? last = head.prev; 314if (head == null) { throw new InvalidOperationException(SR.LinkedListEmpty); } 315InternalRemoveNode(head); 320if (head == null) { throw new InvalidOperationException(SR.LinkedListEmpty); } 321InternalRemoveNode(head.prev!); 389Debug.Assert(head == null && count == 0, "LinkedList must be empty when this method is called!"); 400Debug.Assert(head != null, "This method shouldn't be called on empty list!"); 403Debug.Assert(count == 1 && head == node, "this should only be true for a list with only one node"); 410if (head == node) 482LinkedListNode<T>? node = head; 491} while (node != head); 515_node = list.head; 551if (_node == _list.head) 566_node = _list.head; 612get { return next == null || next == list!.head ? null : next; } 617get { return prev == null || this == list!.head ? null : prev; }