public static BeregnPoengForNesteRegistrering ( string poengArray, int currentIndex ) : int | ||
poengArray | string | |
currentIndex | int | |
Résultat | int |
public static int BeregnPoengForNesteRegistrering(string poengArray, int currentIndex)
{
if (string.IsNullOrEmpty(poengArray))
return 0;
var poengListe = SplitOgParse(poengArray);
var index = currentIndex;
if (currentIndex > poengListe.Length - 1)
index = poengListe.Length - 1;
return poengListe[index];
}