c# - How to get a stream of an in memory string? -
i have string
of data, want have stream
of without saving storage file , getting stream of it. send stream skydrive. anyway.
await client.uploadasync(folderid, filename, stream, overwriteoption.overwrite);
is there anyway stream
of in-memory string value, without saving storage first?
you can write memorystream
:
using(var stream = new memorystream()) { var writer = new streamwriter(stream); writer.write(yourstring); writer.flush(); stream.position = 0; await client.uploadasync(folderid, filename, stream, overwriteoption.overwrite); }
Comments
Post a Comment