日期:2014-05-17 浏览次数:20918 次
string str = "";
for (int i = 0; i < s.Length; i++)
{
if (str != s[i, 0])
{
str = s[i, 0];
tv.Nodes.Add(new TreeNode(s[i, 1]));
}
else
{
tv.Nodes[str].Nodes.Add(new TreeNode(s[i, 1]));
}
}
private void button1_Click(object sender, EventArgs e)
{
string[][] strArr = new string[8][];
strArr[0] = new string[] { "2013/3/12", "a" };
strArr[1] = new string[] { "2013/3/12", "b" };
strArr[2] = new string[] { "2013/3/13", "c" };
strArr[3] = new string[] { "2013/3/13", "d" };
strArr[4] = new string[] { "2013/3/13", "e" };
strArr[5] = new string[] { "2013/3/14", "f" };
strArr[6] = new string[] { "2013/3/14", "g" };
strArr[7] = new string[] { "2013/3/14", "h" };
foreach (var data in strArr)
{
string date = data[0];
&nbs