Skip to content

Instantly share code, notes, and snippets.

@thomaslevesque
Created September 5, 2013 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomaslevesque/735f852c2a396bd7a639 to your computer and use it in GitHub Desktop.
Save thomaslevesque/735f852c2a396bd7a639 to your computer and use it in GitHub Desktop.
interface I1
{
void Add(int _fn, int _sn);
}
interface I2
{
void Add(int _fn, int _sn);
}
abstract class Simple: I2, I1
{
public abstract void Add(int _fn, int _sn);
public abstract void Prod(int _fn, int _sn);
public abstract void Sub(int _fn, int _sn);
void I2.Add(int _fn, int _sn)
{
AddInternal(_fn, _sn);
}
protected abstract void AddInternal(int _fn, int _sn);
}
class Test : Simple
{
public override void Add(int _fn, int _sn)
{
}
public override void Prod(int _fn, int _sn)
{
}
public override void Sub(int _fn, int _sn)
{
}
protected override void AddInternal(int _fn, int _sn)
{
Console.WriteLine(_fn + _sn);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment