Skip to content

Instantly share code, notes, and snippets.

@yesez
Created April 27, 2013 17:52
Show Gist options
  • Save yesez/5473951 to your computer and use it in GitHub Desktop.
Save yesez/5473951 to your computer and use it in GitHub Desktop.
using System;
class Program
{
static void Main(string[] args)
{
var nieto = new Nieto();
Console.WriteLine(nieto.Sumar(1, 3));
Console.ReadKey();
}
}
public class Abuelo
{
public int Sumar(int num1, int num2)
{
return num1 + num2;
}
}
public class Padre:Abuelo
{
public int Restar(int num1, int num2)
{
return num1 - num2;
}
}
public class Nieto:Padre
{
public int Multiplicar(int num1, int num2)
{
return num1 * num2;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment