using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Collections;
using System.IO;
using Microsoft.Win32;
using System.Net;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
FileStream f = new FileStream("a.bat", FileMode.OpenOrCreate, FileAccess.ReadWrite);
for (int i = 0; i < 10;i++ )
{
f.WriteByte((byte)i);
//调用WriteByte将字节写入到文件里面
}
f.Close();
Console.ReadKey();
}
}
}
C#写入二进制数据
猜你喜欢
转载自blog.csdn.net/cosmopolitanme/article/details/79315248
今日推荐
周排行