//Read file to byte arrayFileStream stream = File.OpenRead(@"c:\path\to\your\file\here.txt");byte[] fileBytes= new byte[stream.Length];stream.Read(fileBytes, 0, fileBytes.Length);stream.Close();//Begins the process of writing the byte array back to a fileusing (Stream file = File.OpenWrite(@"c:\path\to\your\file\here.txt")){ file.Write(fileBytes, 0, fileBytes.Length);}
联系客服