.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
474 B

using System;
using System.IO;
namespace ICSharpCode.Decompiler.Tests
{
public class NotUsingBlock
{
public void ThisIsNotAUsingBlock()
{
object obj = File.OpenRead("...");
IDisposable disposable;
try
{
(obj as FileStream).WriteByte(2);
Console.WriteLine("some text");
}
finally
{
disposable = (obj as IDisposable);
if (disposable != null)
{
disposable.Dispose();
}
}
Console.WriteLine(disposable);
}
}
}