输入输出为Console.*实现
输入时需要使用convert.*转换为需要的类型
2. 遍历数组中所有元素:如string[] factors; foreach(string onefactor in factors);
3. 关键字ref引用的意思void fun( ref int a )同void fun(int &a)
4. 委托关键字:delegate
5. 多继承
6.虚函数的实现:virtual override
6. 文件读取
FileStream fs = new FileStream(filename, FileMode.Open);
//开始写入
fs.Position = fs.Length;
StreamWriter sw = new StreamWriter(fs);
string writetext = "添加的内容";
sw.Write(writetext);
sw.Close();
fs.Close();
//读文件
StreamReader sr = new StreamReader(choosefilename, Encoding.Default);
line = sr.ReadLine();
while ((line = sr.ReadLine()) != null)
{
//do something
}
sr.close();