HttpContentCollectionExtensions.FirstStartOrDefault Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Returns the first HttpContent in a sequence that has a ContentDispositionHeaderValue header field parameter equal to start. This parameter is typically used in connection with multipart/related content (see RFC 2387).

Namespace:  System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)


<ExtensionAttribute> _
Public Shared Function FirstStartOrDefault ( _
    contents As IEnumerable(Of HttpContent), _
    start As String _
) As HttpContent
public static HttpContent FirstStartOrDefault(
    this IEnumerable<HttpContent> contents,
    string start
static HttpContent^ FirstStartOrDefault(
    IEnumerable<HttpContent^>^ contents, 
    String^ start
static member FirstStartOrDefault : 
        contents:IEnumerable<HttpContent> * 
        start:string -> HttpContent 
public static function FirstStartOrDefault(
    contents : IEnumerable<HttpContent>, 
    start : String
) : HttpContent


  • start
    Type: System.String
    The start value to look for. A match is found if a HttpContent has a Content-ID header field with the given value.

Return Value

Type: System.Net.Http.HttpContent
null if source is empty or if no element matches; otherwise the first HttpContent in the sequence with a matching value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<HttpContent>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also


HttpContentCollectionExtensions Class

System.Net.Http Namespace