added helsinki
This commit is contained in:
@@ -1,37 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp1
|
||||
{
|
||||
class Osztaly
|
||||
{
|
||||
private static int peldanyokszama = 0;
|
||||
public Osztaly()
|
||||
{
|
||||
peldanyokszama++;
|
||||
}
|
||||
|
||||
public static int Peldanyszam()
|
||||
{
|
||||
return peldanyokszama;
|
||||
}
|
||||
~Osztaly()
|
||||
{
|
||||
Console.WriteLine(Peldanyszam());
|
||||
}
|
||||
|
||||
}
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Osztaly objektum = new Osztaly();
|
||||
Console.WriteLine(Osztaly.Peldanyszam());
|
||||
Osztaly obj = new Osztaly();
|
||||
Osztaly obj2 = new Osztaly();
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp1
|
||||
{
|
||||
class Osztaly
|
||||
{
|
||||
private static int peldanyokszama = 0;
|
||||
public Osztaly()
|
||||
{
|
||||
peldanyokszama++;
|
||||
}
|
||||
|
||||
public static int Peldanyszam()
|
||||
{
|
||||
return peldanyokszama;
|
||||
}
|
||||
~Osztaly()
|
||||
{
|
||||
Console.WriteLine(Peldanyszam());
|
||||
}
|
||||
|
||||
}
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Osztaly objektum = new Osztaly();
|
||||
Console.WriteLine(Osztaly.Peldanyszam());
|
||||
Osztaly obj = new Osztaly();
|
||||
Osztaly obj2 = new Osztaly();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user