LinkedList<T>.First 属性

定义

获取 LinkedList<T> 的第一个节点。Gets the first node of the LinkedList<T>.

public:
 property System::Collections::Generic::LinkedListNode<T> ^ First { System::Collections::Generic::LinkedListNode<T> ^ get(); };
public System.Collections.Generic.LinkedListNode<T> First { get; }
public System.Collections.Generic.LinkedListNode<T>? First { get; }
member this.First : System.Collections.Generic.LinkedListNode<'T>
Public ReadOnly Property First As LinkedListNode(Of T)

属性值

LinkedListNode<T>

LinkedListNode<T> 的第一个 LinkedList<T>The first LinkedListNode<T> of the LinkedList<T>.

示例

有关包括此属性的示例,请参阅 LinkedList<T> 类。For an example that includes this property, see the LinkedList<T> class.

注解

LinkedList<T> 接受 null 作为 Value 引用类型的有效,并允许重复值。LinkedList<T> accepts null as a valid Value for reference types and allows duplicate values.

如果 LinkedList<T> 为空,则 First 和属性将 Last 包含 nullIf the LinkedList<T> is empty, the First and Last properties contain null.

检索此属性的值的运算复杂度为 O(1)。Retrieving the value of this property is an O(1) operation.

适用于