I've crated a new field called `cerveny` & `cerny` with some numbers.
But I'm getting a problem when I try to do `foreach`. I foud function `foreach` just a few days ago so I don't know how it correctly works.
Someone knows why I'm getting this error?

```
not all code paths return a value

```

Thanks so much.

Field:

```
int[] cerveny = new int[] { 1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36 };
int[] cerny = new int[] { 2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35 };

```

variables

```
Credit = 0;
vyhry = 0;
Sazka = 0;
Vyhra = 0;
sazky = new ArrayList();

```

And thats the for each

```
Random rnd = new Random();
int Cislo = rnd.Next(0, 36);
Vyhra = 0;
foreach (string[] pole in sazky)
{
    if (pole[0] == Cislo.ToString())
    {
        Vyhra += Convert.ToInt32(pole[1]) * 36;
    }
    if (pole[0] == "licha" && Cislo % 2 == 1)
    {
        Vyhra += Convert.ToInt32(pole[1]) * 2;
    }
    if (pole[0] == "suda" && Cislo % 2 == 0)
    {
        Vyhra += Convert.ToInt32(pole[1]) * 2;
    }
    if (pole[0] == "cervena")
    {
        foreach (int policko in cerveny)
        {
            if (pole[0] == Cislo.ToString())
            {
                Vyhra += Convert.ToInt32(pole[1]) * 2;
            }
        }
        if (pole[0] == "cerna")
        {
            foreach (int policko in cerny)
            {
                if (pole[0] == Cislo.ToString())
                {
                    Vyhra += Convert.ToInt32(pole[1]) * 2;
                }
            }
        }
    }
    vyhry += Vyhra;
    sazky.Clear();
    Sazka = 0;
    Credit += Vyhra;
    return Cislo;
}

```