Is it always necessary to close streams or, because .net is managed code, will it be closed automatically as soon as it drops out of scope (assuming there are no exceptions raised).
Illustrated:
static string SerialiseObjectToBase64(object obj)
{
var mstream = new MemoryStream();
...
return Convert.ToBase64String(mstream.ToArray());
}
Is the above code acceptable?