Determines the best character encoding for reading or writing an HTTP entity body, given a set of content headers.
Namespace:   System.Net.Http.Formatting
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
public Encoding SelectCharacterEncoding(
    HttpContentHeaders contentHeaders
)
public:
Encoding^ SelectCharacterEncoding(
    HttpContentHeaders^ contentHeaders
)
member SelectCharacterEncoding : 
        contentHeaders:HttpContentHeaders -> Encoding
Public Function SelectCharacterEncoding (
    contentHeaders As HttpContentHeaders
) As Encoding
Parameters
- contentHeaders 
 Type: System.Net.Http.Headers.HttpContentHeaders- The content headers. 
Return Value
Type: System.Text.Encoding
The encoding that is the best match.
See Also
MediaTypeFormatter Class
System.Net.Http.Formatting Namespace
Return to top