日期:2014-05-16 浏览次数:20921 次
class Program
{
static void Main(string[] args)
{
try
{
var mmf = MemoryMappedFile.CreateFromFile(@"d:\my.txt", FileMode.Open, "ImgA");
var accessor = mmf.CreateViewAccessor(0, 20, MemoryMappedFileAccess.Read);
byte b= accessor.ReadByte(0);
Console.WriteLine(b);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
finally
{
}
}
}