.NET Framework 4.5
在 LinkedList<T> 的结尾处添加指定的新节点。
命名空间: System.Collections.Generic
程序集: System (在 System.dll 中)
参数
-
node
-
类型:
System.Collections.Generic.LinkedListNode
<
T
>
要添加至 LinkedList<T> 结尾的新 LinkedListNode<T>。
异常 | 条件 |
---|---|
ArgumentNullException | node 为 null。 |
InvalidOperationException | node 属于另一个 LinkedList<T>。 |
LinkedList<T> 接受 null 作为引用类型的有效 Value,并且允许重复值。
如果 LinkedList<T> 为空,则新节点将变为 First 和 Last。
此方法的运算复杂度为 O(1)。
有关按此方式使用 LinkedList<T> 类的示例,请参见。
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008(不支持服务器核心角色), Windows Server 2008 R2(支持带 SP1 或更高版本的服务器核心角色;不支持 Itanium)
.NET Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参阅 .NET Framework 系统要求。