added helsinki
This commit is contained in:
@@ -1,64 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp2
|
||||
{
|
||||
class Jarmu
|
||||
{
|
||||
public int Evjarat { get; set; }
|
||||
public string Marka { get; set; }
|
||||
public string Tulajdonos { get; set; }
|
||||
public virtual void Tulaj()
|
||||
{
|
||||
Console.WriteLine($"{Tulajdonos} elégedett a {Marka} márkájú {Evjarat}-es évjáratú járművével.");
|
||||
}
|
||||
}
|
||||
|
||||
class Auto : Jarmu {
|
||||
public override void Tulaj()
|
||||
{
|
||||
Console.WriteLine($"{Tulajdonos} elégedett a {Marka} márkájú {Evjarat}-es évjáratú autójával.");
|
||||
}
|
||||
}
|
||||
|
||||
class Motor : Jarmu
|
||||
{
|
||||
public override void Tulaj() {
|
||||
Console.WriteLine($"{Tulajdonos} elégedett a {Marka} márkájú {Evjarat}-es évjáratú motorjával.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Valami
|
||||
{
|
||||
private string[] adat = new string[5];
|
||||
public string this[int index]
|
||||
{
|
||||
get { return adat[index]; }
|
||||
set { adat[index] = value;}
|
||||
}
|
||||
}
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Jarmu j = new Jarmu { Evjarat = 1999, Marka = "Suzuki", Tulajdonos = "Szabó Márton"};
|
||||
j.Tulaj();
|
||||
Jarmu j2 = new Auto{ Evjarat = 1999, Marka = "Suzuki", Tulajdonos = "Szabó Márton" };
|
||||
Jarmu j3 = new Motor { Evjarat = 1999, Marka = "Suzuki", Tulajdonos = "Szabó Márton" };
|
||||
j2.Tulaj();
|
||||
j3.Tulaj();
|
||||
|
||||
Valami asd = new Valami();
|
||||
asd[0] = "asd";
|
||||
asd[1] = "xd";
|
||||
|
||||
Console.WriteLine(asd[0]);
|
||||
Console.WriteLine(asd[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp2
|
||||
{
|
||||
class Jarmu
|
||||
{
|
||||
public int Evjarat { get; set; }
|
||||
public string Marka { get; set; }
|
||||
public string Tulajdonos { get; set; }
|
||||
public virtual void Tulaj()
|
||||
{
|
||||
Console.WriteLine($"{Tulajdonos} elégedett a {Marka} márkájú {Evjarat}-es évjáratú járművével.");
|
||||
}
|
||||
}
|
||||
|
||||
class Auto : Jarmu {
|
||||
public override void Tulaj()
|
||||
{
|
||||
Console.WriteLine($"{Tulajdonos} elégedett a {Marka} márkájú {Evjarat}-es évjáratú autójával.");
|
||||
}
|
||||
}
|
||||
|
||||
class Motor : Jarmu
|
||||
{
|
||||
public override void Tulaj() {
|
||||
Console.WriteLine($"{Tulajdonos} elégedett a {Marka} márkájú {Evjarat}-es évjáratú motorjával.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Valami
|
||||
{
|
||||
private string[] adat = new string[5];
|
||||
public string this[int index]
|
||||
{
|
||||
get { return adat[index]; }
|
||||
set { adat[index] = value;}
|
||||
}
|
||||
}
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Jarmu j = new Jarmu { Evjarat = 1999, Marka = "Suzuki", Tulajdonos = "Szabó Márton"};
|
||||
j.Tulaj();
|
||||
Jarmu j2 = new Auto{ Evjarat = 1999, Marka = "Suzuki", Tulajdonos = "Szabó Márton" };
|
||||
Jarmu j3 = new Motor { Evjarat = 1999, Marka = "Suzuki", Tulajdonos = "Szabó Márton" };
|
||||
j2.Tulaj();
|
||||
j3.Tulaj();
|
||||
|
||||
Valami asd = new Valami();
|
||||
asd[0] = "asd";
|
||||
asd[1] = "xd";
|
||||
|
||||
Console.WriteLine(asd[0]);
|
||||
Console.WriteLine(asd[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user