SynchronizedCollection<T>.SetItem(Int32, T) 方法
定义
使用另一项替换指定索引处的项。Replaces the item at a specified index with another item.
protected:
virtual void SetItem(int index, T item);
protected virtual void SetItem (int index, T item);
abstract member SetItem : int * 'T -> unit
override this.SetItem : int * 'T -> unit
Protected Overridable Sub SetItem (index As Integer, item As T)
参数
- index
- Int32
要替换的对象的从零开始的索引。The zero-based index of the object to be replaced.
- item
- T
要替换的对象。The object to replace
例外
指定的 index 小于零或大于集合中的项数。The index specified is less than zero or greater than the number of items in the collection.