目录
效果
代码
private void button1_Click(object sender, EventArgs e)
{
string path = Application.StartupPath + "\\test.flv";
//3byte 总是FLV(0x46 0x4C 0x56)
byte[] Type = new byte[3];
using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read))
{
fs.Read(Type, 0, Type.Length);
}
String content = Encoding.ASCII.GetString(Type, 0, Type.Length);
}
private void button1_Click(object sender, EventArgs e)
{
string path = Application.StartupPath + "\\test.flv";
//3byte 总是FLV(0x46 0x4C 0x56)
byte[] Type = new byte[3];
using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read))
{
fs.Read(Type, 0, Type.Length);
}
String content = Encoding.ASCII.GetString(Type, 0, Type.Length);
}