Created
May 12, 2016 01:00
-
-
Save pawelpabich/673c8a5c0081d66c6842e0644240e75a to your computer and use it in GitHub Desktop.
Same name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ConsoleApplication3 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine(new Test().GetExtension()); | |
Console.ReadLine(); | |
} | |
} | |
public class Test : ITest | |
{ | |
protected string Get() | |
{ | |
return "works"; | |
} | |
string ITest.Get() | |
{ | |
return Get(); | |
} | |
} | |
public interface ITest | |
{ | |
string Get(); | |
} | |
public static class TestExtensions | |
{ | |
public static string GetExtension(this ITest test) | |
{ | |
return test.Get(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment