比如,list<T> t=new list<T>();
t.add(T1);
t.add(T2);
list<list<T>> x=new list<list<T>>();
x.add(t);
这样可以吗?!就是一个LIST包含多个“包含某个类的LIST”。
t.add(T1);
t.add(T2);
list<list<T>> x=new list<list<T>>();
x.add(t);
这样可以吗?!就是一个LIST包含多个“包含某个类的LIST”。
解决方案 »
- C# WPF程序 在旗舰版win7可运行,专业版win7死活不行,求助!
- DevExpress.XtraBars.BarManager 鼠标事件
- SQL视图统计方法。(应收应付)
- 怎么获取隐藏得窗体
- 编辑dataGridView的单元格时怎样按ebter后换行啊?
- 局域网中想做一个UKEY和CA认证。。。。。。
- C#中如何获得非托管DLL中的输出参数?
- A(a,b,c) a为key,B(x,b,c) x为key,现将表A的记录集插入B表中的SQL语句如何写:
- listview属性的Selectedindexchanged事件索取索引号,第二次点击即出错,哪位大神帮个忙
- DataGrid的按钮列,怎么样加入"删除确认"??
- C#winform水晶报表推模式使用多表联查时没有数据显示出来?
- 如何写一个返回数据库连接对象的单例类
public List<T> CreateList<T>() where T : new()
{
List<T> t = new List<T>();
t.Add(new T());
t.Add(new T());
List<List<T>> x = new List<List<T>>();
x.Add(t); return t;
}
更正:
public List<List<T>> CreateList<T>() where T : new()
{
List<T> t = new List<T>();
t.Add(new T());
t.Add(new T());
List<List<T>> x = new List<List<T>>();
x.Add(t); return x;
}
{
//存储查询的键盘记录信息
List<KeyloggerInfo> listKeyInfo = new List<KeyloggerInfo>();
List<object> listObj = new List<object>();
int sumData = Convert.ToInt32(strNum[0]);//总数据条数
int pageData = 20;//每页显示的条数
int pageSum = sumData / pageData;//得到总页数
int pages = sumData % 20;
if (pages != 0)
{
pageSum++;
}
string[] strInfo = null;
int index = 0;
for (int j = 0; j < strData.Length - 1; j++)
{
strInfo = strData[j].ToString().Split(splits, StringSplitOptions.None);
KeyloggerInfo keyInfo = new KeyloggerInfo();
keyInfo.Mid = Convert.ToInt32(strNum[4]);
keyInfo.Keylogger = strInfo[index];
index++;
keyInfo.CombiKey = strInfo[index];
for (int i = 0; i < keyInfo.CombiKey.Length; i++)
{
if (keyInfo.CombiKey.Substring(i, 1) == "1")
{
if (i == 0)
{
keyInfo.Keylogger += "+Alt";
}
else if (i == 1)
{
keyInfo.Keylogger += "+Ctrl";
}
else if (i == 2)
{
keyInfo.Keylogger += "+Shift";
}
else if (i == 3)
{
keyInfo.Keylogger += "+Windows";
}
}
}
index++;
keyInfo.DateTime = Convert.ToDateTime(strInfo[index]).ToString("yyyy-MM-dd HH:mm:ss");
index++;
keyInfo.Applic = strInfo[index];
index++;
keyInfo.K_userName = strInfo[index];
index++;
keyInfo.K_agentName = SelectAgentByMid(keyInfo.Mid);
keyInfo.PcName = SelectPcName(keyInfo.Mid);
listKeyInfo.Add(keyInfo);
index = 0;
strInfo = null;
}
listObj.Add(pageSum);
listObj.Add(listKeyInfo);
return listObj;
}