0

How to return an array

HOW DO I RETURN AN ARRAY FROM A FUNCTION ???

17th Sep 2020, 1:20 PM
MINHENG LI
MINHENG LI - avatar
9 Answers
+ 2
Will you please share your code?
17th Sep 2020, 1:31 PM
The future is now thanks to science
The future is now thanks to science - avatar
+ 2
Try this: int[] array = new int [5] ={1,2,3,4,5}
17th Sep 2020, 1:39 PM
The future is now thanks to science
The future is now thanks to science - avatar
17th Sep 2020, 1:42 PM
The future is now thanks to science
The future is now thanks to science - avatar
+ 1
ok thanks
17th Sep 2020, 1:41 PM
MINHENG LI
MINHENG LI - avatar
0
I am sorry but it is too confusing, I just learnt about methods
17th Sep 2020, 1:25 PM
MINHENG LI
MINHENG LI - avatar
0
i did the same things except creating an int array, but it tells me that i can’t implicitly convert int array type to int type
17th Sep 2020, 1:28 PM
MINHENG LI
MINHENG LI - avatar
0
public static int[] GetNumbers { int [] array=new [] {1,2,3,4,5}; return array; }
17th Sep 2020, 1:36 PM
MINHENG LI
MINHENG LI - avatar
- 2
Hi
18th Sep 2020, 11:26 AM
لا اله الا الله محمد رسول الله
لا اله الا الله محمد رسول الله - avatar