C# 填几个空给30分

来源:百度知道 编辑:UC知道 时间:2024/07/02 02:55:06
private void Zwindows_Load(object sender, EventArgs e)
{
//反序列化路径
FileStream fs = new FileStream(@"E:\\path.vs", FileMode.Open, FileAccess.Read);
BinaryFormatter bf = new BinaryFormatter();
toos t = (toos)bf.Deserialize(fs);
foreach (这里怎么填);
{

listView1.Items.Add(????)
}

fs.Close();
}

大概说下 就是遍历listview里面的所有成员 然后反序列化后让他们正常输出
但是我只能输出一个而且是每添加一个就是那一个 其他的根本就输不出来
帮我解决下,我一直在线没五分钟看一次答案
如果能解决我还追加

这个东西我做过 不过忘记了 今天没带U盘 等明天给你说 咋样~

toos 是个嘛?list?

var item in toos.*(具体看toos的属性吧)

foreach(var tvalue int toos )
{
listview1.Items.Add(tvalue);
}
这个不一定正确,还要看你想填充什么数据,及需要反序列化哪些内容

楼上的也问了toos是个什么,类吗还是。。。