Search
Get Started
C
C#
•
15mo ago
Wallace
✅ Doing school HW and am unsure how to fix my issue. Trying to loop through an array with subroutine
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,010
Members
View on Discord
Was this page helpful?
Yes
No
W
Wallace
OP
•
10/3/24, 1:52 PM
W
Wallace
Click to see attachment
N
nullptr
•
10/3/24, 1:52 PM
you
're not passing the cards as a parameter to
N
nullptr
•
10/3/24, 1:52 PM
you
'd need to do
to pass it
N
nullptr
you'd need to do `loopA(cards)` to pass it
W
Wallace
OP
•
10/3/24, 1:53 PM
thank you so much not sure how I overlooked that
.
W
Wallace
OP
•
10/3/24, 1:53 PM
have a good day
N
nullptr
•
10/3/24, 1:53 PM
its cool
!
! you too
F
FusedQyou
•
10/3/24, 2:26 PM
Note that if you want
, you can also move that array outside of the method
. This way you don
't have to pass it as an argument
(make sure to remove the parameter from
)
. You do need to also make the array
like the methods
.
F
FusedQyou
•
10/3/24, 2:26 PM
I guess this is not what you
're supposed to do in the assignment
, but a little tip nonetheless
loopA
loopA
loopA
loopA
loopA(cards)
loopA(cards)
static
static