function, methord | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

function, methord

Private int[] lotto5() { Random rdm=new Random(); For(int a=0; a<5;a++) { do { Thread.Sleep(25); l=rdm.Next(1,70); }while (myArray.contians(l)); myArray[a]=l; How to return This methord.

7th Jul 2017, 12:56 PM
lee ratana
3 Antworten
0
return myArray; where is myArray declared
7th Jul 2017, 5:01 PM
sneeze
sneeze - avatar
0
https://code.sololearn.com/cCY8meh4WdMi I wrote some example code based on your method. Notice I declared int [] internal_array = new int[5] ; int l; For is not with a capital F Thread is in System.Threading and not in System.Threading.Tasks Contains is with a capital C Contains is writen with ai not ia
7th Jul 2017, 8:14 PM
sneeze
sneeze - avatar
0
thanks for advice sir ,,
8th Jul 2017, 1:47 AM
lee ratana