add Programmyday form github
This commit is contained in:
10
KFZ/KFZ.csproj
Normal file
10
KFZ/KFZ.csproj
Normal file
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
34
KFZ/Program.cs
Normal file
34
KFZ/Program.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
namespace KFZ
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
PKW p = new PKW(42);
|
||||
}
|
||||
}
|
||||
class Fahrzeuge
|
||||
{
|
||||
private int id;
|
||||
public Fahrzeuge()
|
||||
{
|
||||
Console.WriteLine("Fahrzeuge ohne Para");
|
||||
}
|
||||
public Fahrzeuge(int id)
|
||||
{
|
||||
this.id = id;
|
||||
Console.WriteLine("Fahrzeug mit Para");
|
||||
}
|
||||
}
|
||||
class PKW : Fahrzeuge
|
||||
{
|
||||
public PKW()
|
||||
{
|
||||
Console.WriteLine("Pkw ohne Para");
|
||||
}
|
||||
public PKW(int id) : base(id)
|
||||
{
|
||||
Console.WriteLine("Pkw mit Para");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user