Top "Memorystream" questions

A memory stream is a kind of stream that has several methods to access and store data in memory.

Is a memory leak created if a MemoryStream in .NET is not closed?

I have the following code: MemoryStream foo(){ MemoryStream ms = new MemoryStream(); // write stuff to ms return ms; } void bar(){ MemoryStream …

c# .net memory-leaks memorystream
Saving a bitmap into a MemoryStream

Should I allocate the memory or just the object of the memory stream: Is this OK? MemoryStream memoryStream = new MemoryStream(); …

c# bitmap memorystream
Converting TMemoryStream to 'String' in Delphi 2009

We had the following code prior to Delphi 2009: function MemoryStreamToString(M : TMemoryStream): String; var NewCapacity: Longint; begin if (M.Size = &…

delphi string unicode delphi-2009 memorystream
How to download memorystream to a file?

I'm using the below sample code for writing and downloading a memory stream to a file in C#. MemoryStream memoryStream = …

c# asp.net memorystream
Writing a memory stream to a file

I have tried retrieving data in the json format as a string and writing it to a file and it …

c# json memorystream
c# creating file using memorystream instead of textwriter

I have an application that is currently creating a text file to import into an accounting application. It is using …

c# memorystream
Reset or Clear .NET MemoryStream

The .NET MemoryStream does not appear to have a .Reset or .Clear method. I was thinking of using the following …

.net memorystream
StreamWriter writing to MemoryStream

I was under the impression that when you called Flush() in a StreamWriter object it writes to the underlying stream, …

c# .net stream memorystream
Creating WPF BitmapImage from MemoryStream png, gif

I am having some trouble creating a BitmapImage from a MemoryStream from png and gif bytes obtained from a web …

wpf image webrequest memorystream bitmapimage
Error" Parameter is not valid " while converting Bytes into Image

I am converting bytes into an image but I get an error Parameter is not valid I am pasting my …

c# .net image bytearray memorystream