Created
August 29, 2020 09:49
-
-
Save kurulerdem/d8177196d76c8269f7e701ab4d37fb19 to your computer and use it in GitHub Desktop.
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 KargoOrnegi | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
KargoYonet kargoYonet = new KargoYonet(); | |
kargoYonet.gonder = new SubeGonder(); | |
kargoYonet.Add(); | |
Console.ReadLine(); | |
} | |
} | |
class KargoYonet | |
{ | |
public IGonder gonder { get; set; } | |
public void Add() | |
{ | |
gonder.Gonder(); | |
} | |
} | |
interface IGonder | |
{ | |
void Gonder(); | |
} | |
class AdresGonder : IGonder | |
{ | |
public void Gonder() | |
{ | |
Console.WriteLine("Adrese Gonderildi"); | |
} | |
} | |
class SubeGonder : IGonder | |
{ | |
public void Gonder() | |
{ | |
Console.WriteLine("Subeye Gonderildi"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment