先引用 using System.IO;
//WebService 或 WCF 提供的服務協助轉為byte[]
System.Net.WebClient wc = new System.Net.WebClient();
byte[] bytes = wc.DownloadData(FilePath);
//WebService 或 WCF 提供服務部分
using (FileStream fs = new FileStream(fileFullName, FileMode.Open, FileAccess.Read))
using (BinaryReader br = new BinaryReader(fs))
return br.ReadBytes(Convert.ToInt32(fs.Length));
沒有留言:
張貼留言