RouteCollection.InsertItem(Int32, RouteBase) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将指定的路由插入 RouteCollection 到对象中的指定索引处。
protected:
override void InsertItem(int index, System::Web::Routing::RouteBase ^ item);
protected override void InsertItem(int index, System.Web.Routing.RouteBase item);
override this.InsertItem : int * System.Web.Routing.RouteBase -> unit
Protected Overrides Sub InsertItem (index As Integer, item As RouteBase)
参数
- index
- Int32
插入位置 item 的从零开始的索引。
- item
- RouteBase
要插入的路由。
例外
item 是 null。
item 已在集合中。
注解
向对象添加未命名路由 RouteCollection 时,无法添加集合中已有的路由。
GetReadLock使用方法和GetWriteLock方法确保与集合交互,而不会与其他进程发生冲突。