这段C#源代码是什么意思。。
usingSystem;usingSystem.Collections.Generic;usingSystem.Text;namespaceWinPaike{[Seria...
using System;
using System.Collections.Generic;
using System.Text;
namespace WinPaike
{
[Serializable()]
public class ClassUnit
{
//static List<Course> CourseList = new List<Course>();
public const int WeekDay = 5;
public const int CourseCount = 6;
public int ID;
public string Name;
public string Details;
public int[] XuLie = new int[WeekDay * ClassUnit.CourseCount];
public ClassUnit(int id, int[] xulie)
{
ID = id;
XuLie = xulie;
}
public ClassUnit(int id,string name,string details)
{
Details = details;
ID = id;
Name = name;
}
}
} 展开
using System.Collections.Generic;
using System.Text;
namespace WinPaike
{
[Serializable()]
public class ClassUnit
{
//static List<Course> CourseList = new List<Course>();
public const int WeekDay = 5;
public const int CourseCount = 6;
public int ID;
public string Name;
public string Details;
public int[] XuLie = new int[WeekDay * ClassUnit.CourseCount];
public ClassUnit(int id, int[] xulie)
{
ID = id;
XuLie = xulie;
}
public ClassUnit(int id,string name,string details)
{
Details = details;
ID = id;
Name = name;
}
}
} 展开
1个回答
展开全部
[Serializable()] //实现串行化实例
public class ClassUnit
{
//static List<Course> CourseList = new List<Course>(); //这句话被注释掉了 没用.
public const int WeekDay = 5; //..公共常量整型WeekDay 值是5
public const int CourseCount = 6; //..公共常量整型 CourseCount 值是6
public int ID; //声明一个公共整型变量ID;
public string Name; //..公共字符串变量Name
public string Details; //声明一个公共字符串变量Details..
public int[] XuLie = new int[WeekDay * ClassUnit.CourseCount];//创建一个公共数组Xulie,并实例化,
public ClassUnit(int id, int[] xulie)
{
ID = id; //赋值过程....
XuLie = xulie;
}
public ClassUnit(int id,string name,string details)
{
Details = details; //赋值过程...
ID = id;
Name = name;
}
}
public class ClassUnit
{
//static List<Course> CourseList = new List<Course>(); //这句话被注释掉了 没用.
public const int WeekDay = 5; //..公共常量整型WeekDay 值是5
public const int CourseCount = 6; //..公共常量整型 CourseCount 值是6
public int ID; //声明一个公共整型变量ID;
public string Name; //..公共字符串变量Name
public string Details; //声明一个公共字符串变量Details..
public int[] XuLie = new int[WeekDay * ClassUnit.CourseCount];//创建一个公共数组Xulie,并实例化,
public ClassUnit(int id, int[] xulie)
{
ID = id; //赋值过程....
XuLie = xulie;
}
public ClassUnit(int id,string name,string details)
{
Details = details; //赋值过程...
ID = id;
Name = name;
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询