C
C#2y ago
Alex

❔ CS1077 here which I don't know how to resolve. Something to do with the out parameters

https://paste.mod.gg/esakwzvzaedv/0 It wants me to assign some value to the variables but then they're useless
BlazeBin - esakwzvzaedv
A tool for sharing your source code with the world!
4 Replies
Pobiega
Pobiega2y ago
you MUST assign a value to out variables for any and all branches of your program also, with iChoice seeming to be a stateful variable, should this really be static?
Florian Voß
Florian Voß2y ago
the easiest way to do what @Pobiega suggests is to choose a default value for it and assign that default value in the first line before doing anything else
Alex
AlexOP2y ago
thanks its accessed in a few other methods aswell so this is just a bit easier for me
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server