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

RSRP-297913: 'To explicit implementation' should be a refactoring instead of simple context action

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Apr 27, 2012 8:10:25 AM
Updated Apr 27, 2012 8:10:25 AM
Priority Normal
Type Feature
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
using System;

class C : IDisposable
{
    static void Main()
    {
        var c = new C();
        c.Dispose();
    }

    public void Dispose() // To explicit implementation
    {
    }
}


Actual:

using System;

class C : IDisposable
{
    static void Main()
    {
        var c = new C();
        c.Dispose(); // error CS1061: 'C' does not contain a definition for 'Dispose'
    }

    void IDisposable.Dispose()
    {
    }
}


Expected:

using System;

class C : IDisposable
{
    static void Main()
    {
        var c = new C();
        ((IDisposable) c).Dispose(); // OK
    }

    void IDisposable.Dispose()
    {
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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