Probably MemoryStream (msdn link) might help you do this.