ImmutableList<T>.IList.Add(Object) 方法

定义

将项添加到不可变列表。

C#
int IList.Add (object value);

参数

value
Object

要添加到列表中的对象。

返回

新元素插入到的位置,或者为 -1,表示该项未插入到列表中。

实现

例外

始终引发。

注解

此成员是显式接口成员的实现。 它只能在 ImmutableList<T> 实例被强制转换为 IList 接口时使用。

适用于

产品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
UWP 10.0