当前位置:编程学习 > wap >>

Windows Mobile 中 如何把二进制代码保存成图片存储到某个盘符下面?

         BLL.Photo pho = new BLL.Photo();

            DataSet ds = pho.getPhoto();

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                byte[] bytes = (byte[])ds.Tables[0].Rows[i]["PhotoData"];
                FileStream fs = new FileStream(@"F:\" + ds.Tables[0].Rows[i]["Num"] + ".jpg", FileMode.Create, FileAccess.Write);
                fs.Write(bytes, 0, bytes.Length);
                fs.Flush();
                fs.Close();

            }


报错:值不在预期的范围内。 --------------------编程问答--------------------  FileStream fs = new FileStream(@"F:\" + ds.Tables[0].Rows[i]["Num"] + ".jpg", FileMode.Create, FileAccess.Write);

mobile 路径是绝对路径!
补充:移动开发 ,  Windows Phone
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,