📄 utility.cs
字号:
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Windows.Forms;
namespace Demo1___LinqToObjects
{
static class Utility
{
public static string[] ReadAllLines(string path)
{
string[] lines = null;
if (!File.Exists(path))
throw new FileNotFoundException(path);
using (StreamReader sr = File.OpenText(path))
{
List<string> lineList = new List<string>();
string line;
while ((line = sr.ReadLine()) != null)
{
lineList.Add(line);
}
lines = lineList.ToArray();
}
return lines;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -