using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Filechange
{
class Program
{
static void Main(string[] args)
{
string path = @"D:\movie\test.txt";
//创建filestream 对象
FileStream file = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite);
//创建Streamreader进行字节读取
StreamReader sr = new StreamReader(file);
int code = sr.Read();
string str = null;
while (code != -1)
{
str += Convert.ToChar(code);
code = sr.Read();
}
str += " ";
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Filechange
{
class Program
{
static void Main(string[] args)
{
string path = @"D:\movie\test.txt";
//创建filestream 对象
FileStream file = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite);
//创建Streamreader进行字节读取
StreamReader sr = new StreamReader(file);
int code = sr.Read();
string str = null;
while (code != -1)
{
str += Convert.ToChar(code);
code = sr.Read();
}
str += " ";