code snippet:
//byte[] myByteArray = byte array from database (database BLOB)
myByteArray = (byte[]) ((dbCommand.Parameters["parameter"].Value));
string myString =System.Text.Encoding.UTF8.GetString(myByteArray);
Xmldocument doc = new Xmldocument();
doc.Load(myString);
============
I am getting System.OutOfMemoryException
sometimes.
string myString = System.Text.Encoding.UTF8.GetString(myByteArray);
when converting bytearray to string i am getting this error.
is there a way i can make this code robust.
All i am trying to do is loading the BLOB in byte array and then converting them to string and loading them in xmldocument to work with.