首页  编辑  

Base64编码转换后存为文件

Tags: /C#/文件目录操作/   Date Created:

using System . IO;

FileStream vFileStream = new FileStream ( @"c:\temp\temp.jpg" ,

    FileMode . OpenOrCreate, FileAccess . Write);            

byte [] vBuffer = Convert . FromBase64String(textBox1 . Text);

vFileStream . Write(vBuffer, 0 , vBuffer . Length);

vFileStream . Close();