Skip to content

Instantly share code, notes, and snippets.

@FernandoVezzali
Created August 6, 2013 15:43
Show Gist options
  • Save FernandoVezzali/6165682 to your computer and use it in GitHub Desktop.
Save FernandoVezzali/6165682 to your computer and use it in GitHub Desktop.
String To Stream
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