this may not be accurate but its close enough for me
long size =0;object o =newobject();
using (Stream s =newMemoryStream()){BinaryFormatter formatter =newBinaryFormatter();
formatter.Serialize(s, o);
size = s.Length;}
private long ObjectSize(object o)
{
long size = 0;
//object o = new object();
using (Stream s = new MemoryStream())
{
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(s, o);
size = s.Length;
}
return size;
}