Method GetStreamWriter
GetStreamWriter(string?, Encoding?, string?)
Returns a StreamWriter for writing to the response stream, setting the content type and encoding.
public StreamWriter GetStreamWriter(string? contentType, Encoding? encoding, string? newLine = "\r\n")
Parameters
contentType
stringThe content type of the response, or null to omit the content type header.
encoding
EncodingThe encoding to use for the response, or null to use the default encoding.
newLine
stringThe new line string literal for the writer.
Returns
- StreamWriter
A StreamWriter for writing to the response stream.