Usable is an add-in for Fody
Usable adds using statements for local variables that have been created, and implement IDisposable.
Install the Usable.Fody NuGet package and update the Fody NuGet package:
PM> Install-Package Fody
PM> Install-Package Usable.Fody
The Install-Package Fody
is required since NuGet always defaults to the oldest, and most buggy, version of any dependency.
public void Method()
{
var w = File.CreateText("log.txt");
w.WriteLine("I'm a lumberjack an' I'm ok.");
}
public void Method()
{
using (var w = File.CreateText("log.txt"))
{
w.WriteLine("I'm a lumberjack an' I'm ok.");
}
}
Trash designed by Shirley Wu from The Noun Project