⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list.cs

📁 .NET的课件。还不全。。后续我还会传上来的
💻 CS
字号:
using System;
using System.IO;
class MyApp {
	static void Main(string[] args)	{
		FileStream fs = null;
		StreamReader reader = null;
		try {
			fs = new FileStream(@"c:\a.txt", FileMode.Open, FileAccess.Read, FileShare.Read);
			reader = new StreamReader(fs);
			for(string line = reader.ReadLine();line != null;line = reader.ReadLine())
				Console.WriteLine(line);
		}
		catch(IOException e) {
			Console.WriteLine(e.Message);
		}
		finally {
			if(reader != null)
			{
				reader.Close();
				fs.Close();
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -