c# - How to count bytes of data stored inside a DataTable -


assume have datagridview bound datatable. there simple yet realiable way determine total size of stored data (in bytes) inside datatable?

if want number of cells, can multiplying columns rows:

int cells = tbl.columns.count * tbl.rows.count; 

if want size in bytes, try serializing datatable , measuring size, won't 100% accurate, since add boilerplate.


Comments

Popular posts from this blog

SQL php on different pages to Insert (mysqli) -

php - How can an email be returned from Stripe Checkout? -

sql - Partition elimination in Greenplum -