35 lines
597 B
C#
35 lines
597 B
C#
|
class EredmenyElemzo
|
||
|
{
|
||
|
private string Eredmenyek;
|
||
|
|
||
|
private int DontetlenekSzama
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return Megszamol('X');
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private int Megszamol(char kimenet)
|
||
|
{
|
||
|
int darab = 0;
|
||
|
foreach (var i in Eredmenyek)
|
||
|
{
|
||
|
if (i == kimenet) darab++;
|
||
|
}
|
||
|
return darab;
|
||
|
}
|
||
|
|
||
|
public bool NemvoltDontetlenMerkozes
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return DontetlenekSzama == 0;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public EredmenyElemzo(string eredmenyek) // konstruktor
|
||
|
{
|
||
|
Eredmenyek = eredmenyek;
|
||
|
}
|
||
|
}
|