ODataMediaTypeFormatterCollectionExtensions.InsertRange Method

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

  • index
    Type: System.Int32
    The zero-based index at which the new elements should be inserted.

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).

See Also

Reference

ODataMediaTypeFormatterCollectionExtensions Class

System.Web.Http Namespace