Skip to content

ropean/Usable

 
 

Repository files navigation

Usable is an add-in for Fody

Usable Icon - A waste paper basket.

Usable adds using statements for local variables that have been created, and implement IDisposable.

The nuget package NuGet Status

https://nuget.org/packages/Usable.Fody/

PM> Install-Package Usable.Fody

Your Code

public void Method()
{
    var w = File.CreateText("log.txt");
    w.WriteLine("I'm a lumberjack an' I'm ok.");
}

What gets compiled

public void Method()
{
    using (var w = File.CreateText("log.txt"))
    {
        w.WriteLine("I'm a lumberjack an' I'm ok.");
    }
}

Contributors

Icon

Trash designed by Shirley Wu from The Noun Project

About

Disposable, without the Using

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.6%
  • PostScript 0.4%