Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Find()

Definition at line 298 of file LinkedList.cs.

299 {
300 LinkedListNode<T> next = head;
301 EqualityComparer<T> @default = EqualityComparer<T>.Default;
302 if (next != null)
303 {
304 if (value != null)
305 {
306 do
307 {
308 if (@default.Equals(next.item, value))
309 {
310 return next;
311 }
312 next = next.next;
313 }
314 while (next != head);
315 }
316 else
317 {
318 do
319 {
320 if (next.item == null)
321 {
322 return next;
323 }
324 next = next.next;
325 }
326 while (next != head);
327 }
328 }
329 return null;
330 }

References System.Collections.Generic.LinkedList< T >.head, and System.value.

Referenced by System.Collections.Generic.LinkedList< T >.Contains(), and System.Collections.Generic.LinkedList< T >.Remove().