arrays - C# For loop inside of method -
i trying create method step through array loop , if array subscript greater or equal minimum requirement string array subscript added listbox.
here feeble attempt, along method i've tried below it. when calling method awardminimum, whole thing incorrect stating, "has invalid arguments". commented out every level looks like. (level <=10, level >10 && <=20, etc..)
if (level <= 10) { awardminimum(perdayarray, min, awardsarray); /*for (int = 0; < statsize; i++) { if (perdayarray[i] >= 2) { awardlistbox.items.add(awardsarray[i]); } }*/ }
the method itself
private void awardminimum(double perday, int min, string awards) { (int = 0; < statsize; i++) { if (perday >= min) { awardlistbox.items.add(awards); } } }
perdayarray
, awardsarray
array in awardminimum(double perday, int min, string awards)
method use them double , string.
it should :
private void awardminimum(double[] perday, int min, string[] awards)
or
awardminimum(perdayarray[i], min, awardsarray[i]); //where index
Comments
Post a Comment