3

Does DataTable in C# provide a property that gives me the size of each row (number of bytes)?

TheTXI
  • 37,429
  • 10
  • 86
  • 110

1 Answers1

-3

You can determine the unmanaged size of a managed object with Marshal.SizeOf.

JP Alioto
  • 44,864
  • 6
  • 88
  • 112
  • Nice idea, I didn't know about Marshal.SizeOf() but it doesn't work in this case. I just tried this but it throws an argument exception if you call Marshal.SizeOf() with an argument of type DataRow, with the detail "cannot be marshaled as an unmanaged structure; no meaningful size or offset can be computed". – Ben Robbins Aug 01 '11 at 05:55