访问量: 122次,访客数: 122人,浏览量: 1次 
首页  编辑  

Base64编码转换后存为文件

Tags: /C#/文件目录操作/   Date Created: Tue Jun 10 2008 01:18:16 GMT+0000 (Coordinated Universal Time)

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();