<File to Byte Array>
1. File Stream을 이용하여 파일을 Byte 배열로 변환
using System.IO; ... public byte[] FileToByteArray(string path) { byte[] fileBytes = null; try { using(FileStream fileStream = new FileSystem(path, FileMode.Open)) { fileBytes = new byte[fileStream.Length]; fileStream.Read(fileBytes, 0, fileBytes.Length); } } catch (Exception e) { // Exception ... } return fileBytes; }