Created
August 6, 2013 15:43
-
-
Save FernandoVezzali/6165682 to your computer and use it in GitHub Desktop.
String To Stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private MemoryStream GetFakeStream(string s) | |
{ | |
MemoryStream stream = new MemoryStream(); | |
StreamWriter writer = new StreamWriter(stream); | |
writer.Write(s); | |
writer.Flush(); | |
stream.Position = 0; | |
return stream; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment