mirror of
https://github.com/Lendaia/oe-alga-feladatok.git
synced 2026-04-23 04:16:32 +01:00
asdddd
This commit is contained in:
@@ -29,10 +29,11 @@ namespace OE.ALGA.Paradigmak
|
||||
}
|
||||
}
|
||||
}
|
||||
IEnumerator<T> IEnumerable<T>.GetEnumerator()
|
||||
|
||||
new public IEnumerator GetEnumerator()
|
||||
{
|
||||
FeltetelesFeladatTaroloBejaro<T> bejaro = new FeltetelesFeladatTaroloBejaro<T>(tarolo, n, BejaroFeltetel);
|
||||
return bejaro;
|
||||
return bejaro.GetEnumerator();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -58,6 +59,17 @@ namespace OE.ALGA.Paradigmak
|
||||
}
|
||||
object IEnumerator.Current => throw new NotImplementedException();
|
||||
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
foreach (T t in tarolo)
|
||||
{
|
||||
if (t != null && Feltetel(t))
|
||||
{
|
||||
yield return t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -65,6 +77,23 @@ namespace OE.ALGA.Paradigmak
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
// if (aktualisindex < n - 1)
|
||||
// {
|
||||
// aktualisindex++;
|
||||
// if (Feltetel(tarolo[aktualisindex]))
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if (aktualisindex < n - 1)
|
||||
{
|
||||
aktualisindex++;
|
||||
@@ -72,10 +101,7 @@ namespace OE.ALGA.Paradigmak
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return MoveNext();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user