public interface IProgram
void CallFunctionWithInterface();
public string Red { get; set; }
public string Blue { get; set; }
public string Yellow { get; set; }
this.Blue = string.Empty;
this.Yellow = string.Empty;
public virtual void GetColors(Color color)
Console.WriteLine("2. " + color.Blue + " " + color.Red + " " + color.Yellow + " - Output of GetColors(Object) ");
public virtual void GetColors(string x)
Console.WriteLine("1. Test Color " + x + " - Output of GetColors(string x) - Overload Method\n");
public virtual void GetColors()
Console.WriteLine("*****Tutorial - Mark Kevin Mardo*****\n");
class PrimaryColor : Color
public override void GetColors(Color color)
Console.WriteLine("Showed the colors: ");
public class Program : IProgram
public void Main(string[] args)
CallFunctionWithInterface();
public void CallFunctionWithInterface()
PrimaryColor pColor = new PrimaryColor();
pColor.Yellow = "Yellow";
pColor.GetColors("Orange");
pColor.GetColors(pColor);