文件转换成byte[]
public byte[] GetTemplate(string sUser, string sTemplateName) { string sFilePath = Server.MapPath(null) + "//Template//" + sTemplateName; FileStream fs = new FileStream(sFilePath, FileMode.Open, FileAccess.Read); byte[] buffur = new byte[fs.Length]; fs.Read(buffur, 0, (int)fs.Length); return buffur; }
byte[] 转换成 string
UTF8Encoding encoding = new UTF8Encoding(); string sTemplate = encoding.GetString(buffur); posted on 2009-04-09 20:42 shaoyupeng 阅读( ...) 评论( ...) 编辑 收藏转载于:https://www.cnblogs.com/shaoyupeng/archive/2009/04/09/1432702.html
相关资源:DirectX修复工具V4.0增强版