Method ToMemoryStream
ToMemoryStream(String, Encoding)
Returns a new MemoryStream from this string using the given encoding.
Declaration
public static MemoryStream ToMemoryStream(this string self, Encoding encoding)
Parameters
| Type | Name | Description |
|---|---|---|
| String | self | This String instance to return a MemoryStream for. |
| Encoding | encoding | The Encoding used to convert the string into a byte sequence. |
Returns
| Type | Description |
|---|---|
| MemoryStream | A new MemoryStream instance over the encoded string contents. |