Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-469350: Support for C#6.0 `using static` directive

$
0
0
Reporter Daniel Degtyarev (daniel.degtyarev) Daniel Degtyarev (daniel.degtyarev)
Created Apr 20, 2018 12:42:09 PM
Updated Apr 20, 2018 12:42:09 PM
Subsystem Context Actions
Assignee Andrey Dyatlov (Andrey.Dyatlov)
Priority Show-stopper
State Submitted
Type Feature
Fix version 2018.2
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

R# at least should:

  • Preserve existing using static directive, very important and really annoying. Any cleanup, refactoring and so on, just remove them all
  • Has context actions to invoke with using static directive and do not invoke with using static

Context action propose

Lets take a sample code:

using System;

class Program
{
    public static void Main()
    {
         Console.WriteLine("Foo1");
         Console.WriteLine("Foo2");
         Console.ReadKey();
    }
}

Appying the action should produce:

using static System.Console;

class Program
{
    public static void Main()
    {
         WriteLine("Foo1");
         WriteLine("Foo2");
         ReadKey();
    }
}

Plus, the opposed action, Do not invoke as 'using static'.


Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>