MediaType.ReplaceEncoding Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ReplaceEncoding(StringSegment, Encoding) |
Replaces the encoding of the given |
ReplaceEncoding(String, Encoding) |
Replaces the encoding of the given |
ReplaceEncoding(StringSegment, Encoding)
- Source:
- MediaType.cs
- Source:
- MediaType.cs
Replaces the encoding of the given mediaType
with the provided
encoding
.
public:
static System::String ^ ReplaceEncoding(Microsoft::Extensions::Primitives::StringSegment mediaType, System::Text::Encoding ^ encoding);
public static string ReplaceEncoding (Microsoft.Extensions.Primitives.StringSegment mediaType, System.Text.Encoding encoding);
static member ReplaceEncoding : Microsoft.Extensions.Primitives.StringSegment * System.Text.Encoding -> string
Public Shared Function ReplaceEncoding (mediaType As StringSegment, encoding As Encoding) As String
Parameters
- mediaType
- StringSegment
The media type whose encoding will be replaced.
- encoding
- Encoding
The encoding that will replace the encoding in the mediaType
.
Returns
A media type with the replaced encoding.
Applies to
ReplaceEncoding(String, Encoding)
- Source:
- MediaType.cs
- Source:
- MediaType.cs
Replaces the encoding of the given mediaType
with the provided
encoding
.
public:
static System::String ^ ReplaceEncoding(System::String ^ mediaType, System::Text::Encoding ^ encoding);
public static string ReplaceEncoding (string mediaType, System.Text.Encoding encoding);
static member ReplaceEncoding : string * System.Text.Encoding -> string
Public Shared Function ReplaceEncoding (mediaType As String, encoding As Encoding) As String
Parameters
- mediaType
- String
The media type whose encoding will be replaced.
- encoding
- Encoding
The encoding that will replace the encoding in the mediaType
.
Returns
A media type with the replaced encoding.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for