Memory isn't unlimited. Basically, when you convert from a byte array -> string, you have two copies of the same data (one for the byte array and one for the string) in memory.
What exactly are you doing? You are typically better off chunking and reading smaller amounts of data at a time. Use something like a StreamWriter over a stream to automatically handles the byte -> text conversion. From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Monday, September 9, 2013 8:05 PM To: ozDotNet Subject: out of memory..urgent Getting out of memory exception when I try to Dim s as string Dim b() as Byte s=System.Text.Encoding.GetEncoding("utf-8).GetString(b) Definitely something about the length of b..works fine most of the time except if b length is very large Anthony Melbourne StuffUps...learn from others, share with others! http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/ ---------------------------------------------------------------------------------- NOTICE : The information contained in this electronic mail message is privileged and confidential, and is intended only for use of the addressee. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it. (*13POrtC*) -----------------------------------------------------------------------------------
