LinkedList<T>.Last 屬性

定義

取得 LinkedList<T> 的最後一個節點。

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

屬性值

LinkedListNode<T> 的最後一個 LinkedList<T>

範例

如需包含此屬性的範例,請參閱 LinkedList<T> 類別。

備註

LinkedList<T> 接受 null 作為參考型別的有效 Value 值,並允許重複的值。

LinkedList<T>如果是空的First,則與 Last 屬性包含 null

擷取這個屬性的值是一種 O(1) 運算。

適用於