try
{
int readByte =
int bytesToRead =
string fileName = "
// this
// 打開圖片文件
FileStream fs = new FileStream("
// 使用文件流構造一個二進制讀取器將基元數據讀作二進制值
BinaryReader br = new BinaryReader(fs);
XmlTextWriter xmlTxtWt = new XmlTextWriter(fileName
//輸出設置 代碼縮進
xmlTxtWt
// xmlTxtWt
//書寫聲明
xmlTxtWt
xmlTxtWt
xmlTxtWt
xmlTxtWt
byte[] base
do
{
readByte = br
xmlTxtWt
}while(bytesToRead <= readByte);
xmlTxtWt
xmlTxtWt
xmlTxtWt
// xmlTxtWt
xmlTxtWt
MessageBox
// this
}
catch(Exception ex)
{
MessageBox
}
From:http://tw.wingwit.com/Article/program/net/201311/14252.html