ServiceDescriptionBaseCollection.OnSet(Int32, Object, Object) 方法

定义

ServiceDescriptionBaseCollection 中的一个值替换另一个值。Replaces one value with another within the ServiceDescriptionBaseCollection.

protected:
 override void OnSet(int index, System::Object ^ oldValue, System::Object ^ newValue);
protected override void OnSet (int index, object oldValue, object newValue);
override this.OnSet : int * obj * obj -> unit
Protected Overrides Sub OnSet (index As Integer, oldValue As Object, newValue As Object)

参数

index
Int32

可以找到 oldValue 参数的位置的从零开始的索引。The zero-based index where the oldValue parameter can be found.

oldValue
Object

要替换为 newValue 参数的对象。The object to replace with the newValue parameter.

newValue
Object

替换 oldValue 参数的对象。The object that replaces the oldValue parameter.

注解

在设置集合中元素的值时,此方法的默认实现将被重写以执行其他过程,如验证。The default implementation of this method is intended to be overridden to perform additional processes, such as validation, when setting the value of an element in the collection. 此受保护方法只能通过此类或派生类访问。This protected method is accessible only through this class or a derived class.

适用于