自己设计了一个简单的数据结构,但是数据量较大,且数据的长度始终在变化,现在要有需求要保存和读取这些数据,请问如何设计保存方法和读取方法? 小弟道行尚浅,请各位大大赐教啊!! public struct testData
{
public int ma;
public long mb;
public long mc;
public long md;
} public class test
{
public List<List<test>> mary; //count与count2都是随机生成的数,count的值大约是10-15万,count2的值大约是30-50.
//每次生成的testdata数据量约为300万-700万之间.
public void Creat(int count,int count2)
{
mary = new List<List<test>>(); for (int i = 0; i <count; i++)
{
List<test> lary = new List<test>();
for (int n= 0; n< count2; n++)
{
lary.Add(new test());
}
mary.Add(lary);
}
}
public void Save() { } //??
public void Load() { } //??
}数据量大存储 读取 数据量大读取存储数据库
{
public int ma;
public long mb;
public long mc;
public long md;
} public class test
{
public List<List<test>> mary; //count与count2都是随机生成的数,count的值大约是10-15万,count2的值大约是30-50.
//每次生成的testdata数据量约为300万-700万之间.
public void Creat(int count,int count2)
{
mary = new List<List<test>>(); for (int i = 0; i <count; i++)
{
List<test> lary = new List<test>();
for (int n= 0; n< count2; n++)
{
lary.Add(new test());
}
mary.Add(lary);
}
}
public void Save() { } //??
public void Load() { } //??
}数据量大存储 读取 数据量大读取存储数据库
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货