using System;
using ;
using ;
using ;
namespace demo1
{
class Program
{
// static char[] Tranform = new char[36] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
//static string Tranform10To36Hex(long vl_value)
// {
// int i;
// byte[] a = new byte[8];
// byte[] b = new byte[8];
// string Hex36Str;
// for (i = 0; i < 7; i++)
// {
// if (vl_value < 36)
// {
// a[i] = (vl_value.ToString());
// break;
// }
// a[i] = (vl_value % 36);
// vl_value = vl_value / 36;
// }
// for (i = 0; i < 7; i++)
// {
// b[i] = (Tranform[Convert.ToInt32(a[7 - i - 1])]);
// }
// Hex36Str = (b);
// return Hex36Str;
// }
static void Main(string[] args)
{
// cgo = new ();
//decimal dd = ("460020831369683", (171.50));
//(dd);
//long aa = 2173500393;
//string bb=Tranform10To36Hex(aa);
//(bb);
List<Student> list = new List<Student>()
{
new Student{Name="aaa",ClassName="a",Age=20,StuNo="a001"},
new Student{Name="bbb",ClassName="a",Age=18,StuNo="a003"},
new Student{Name="ccc",ClassName="b",Age=20,StuNo="b001"},
new Student{Name="ddd",ClassName="b",Age=20,StuNo="b045"},
new Student{Name="eee",ClassName="c",Age=20,StuNo="c001"},
new Student{Name="fff",ClassName="c",Age=20,StuNo="c008"},
new Student{Name="ggg",ClassName="c",Age=20,StuNo="c050"},
new Student{Name="hhh",ClassName="c",Age=20,StuNo="c007"}
};
Dictionary<string, List<Student>> stuGroup = new Dictionary<string, List<Student>>();
foreach (Student item in list)
{
if (!())
{
(, new List<Student>());
}
stuGroup[].Add(item);
}
foreach (KeyValuePair<string, List<Student>> item in stuGroup)
{
("班级:" + );
foreach (Student stu in )
{
("姓名:" + + "\t班级:" + + "\t年龄:" + + "\t学号:" + );
}
}
();
();
}
}
class Student
{
public string Name { get; set; }
public string ClassName { get; set; }
public int Age { get; set; }
public string StuNo { get; set; }
}
}