中国开发网: 论坛: .NET/C#: 贴子 86595
李颖: 我现在是这样做的
internal class TestFileStream: FileStream
{
public TestFileStream(IntPtr handle, FileAccess access): base(handle, access)
{
}

protected override void Dispose(bool disposing)
{
try
{
base.Dispose(disposing);
}
catch (Exception ex)
{
Log.Write(EventCode.Trace, ErrorLevel.Warning, 0x01050009, "Flush filestream failed " + " : " + ex.ToString());

if (disposing)
throw ex;
}
}

}
DISSENT IS THE HIGHEST FORM OF PATRIOTISM !

--Thomas Jefferson

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录