Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Inserts the elements of a collection into the MediaTypeFormatterCollection at the specified index.
Namespace: System.Web.Http
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Sub InsertRange ( _
collection As MediaTypeFormatterCollection, _
index As Integer, _
items As IEnumerable(Of MediaTypeFormatter) _
)
'Usage
Dim collection As MediaTypeFormatterCollection
Dim index As Integer
Dim items As IEnumerable(Of MediaTypeFormatter)
collection.InsertRange(index, items)
public static void InsertRange(
this MediaTypeFormatterCollection collection,
int index,
IEnumerable<MediaTypeFormatter> items
)
[ExtensionAttribute]
public:
static void InsertRange(
MediaTypeFormatterCollection^ collection,
int index,
IEnumerable<MediaTypeFormatter^>^ items
)
static member InsertRange :
collection:MediaTypeFormatterCollection *
index:int *
items:IEnumerable<MediaTypeFormatter> -> unit
public static function InsertRange(
collection : MediaTypeFormatterCollection,
index : int,
items : IEnumerable<MediaTypeFormatter>
)
Parameters
- collection
Type: System.Net.Http.Formatting.MediaTypeFormatterCollection
The collection to which to insert the items.
- index
Type: System.Int32
The zero-based index at which the new elements should be inserted.
- items
Type: System.Collections.Generic.IEnumerable<MediaTypeFormatter>
The items that should be inserted into the MediaTypeFormatterCollection . The items collection itself cannot be nulla null reference (Nothing in Visual Basic) , but it can contain elements that are nulla null reference (Nothing in Visual Basic).
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type MediaTypeFormatterCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.111) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.111).