What data structure would be the least painful DataTable replacement?

Posted by MatthewMartin on Stack Overflow See other posts from Stack Overflow or by MatthewMartin
Published on 2010-06-01T12:04:57Z Indexed on 2010/06/01 12:13 UTC
Read the original article Hit count: 222

Filed under:
|
|
|
|

I'm storing a lot of sorted ~10 row 2 column/key value pairs in ASP.NET cache-- they're the data for dropdownlists. Right now they are all DataTables, which isn't very space efficient (the rule of thumb is 10x increase in size when data is strored in a dataset).

Old Code

DataTable table = dataAccess.GetDataTable();
dropDownList.DataSource = table;

Hoped for new Code

Unknown data = dataAccess.GetSomethingMoreSpaceEfficient();
dropDownList.DataSource = data;

What pre-existing datastructures are similar enough to DataTable that would minimize code breakage and reduce the serialized size when stored in ASP.NET cache?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET