string[] strs = File.ReadAllLines("文件路径");//读取所有行,返回字符串数组 byte[] datas = File.ReadAllByte("文件路径");//一般读取文件等字节型数据 string str = File.ReadAllText("文件路径");//返回所有的数据为一个字符串