erweiterung
This commit is contained in:
16
BeispielInterfaces/Program.cs
Normal file
16
BeispielInterfaces/Program.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace BeispielInterfaces
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
IrgendwasMitFahren(new Auto());
|
||||
IrgendwasMitFahren(new AmphibienFahrzeug());
|
||||
}
|
||||
static void IrgendwasMitFahren(IFahren fahren)
|
||||
{
|
||||
Console.WriteLine("Diese Mehtode benötigt etwas das fahren kann.");
|
||||
fahren.Fahren();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user