C
C#2d ago
Barroso

Global variable not identified

I do not understand why this function can identify this global variable, i'd like to manipulate it inside the function
No description
3 Replies
Buddy
Buddy2d ago
What does the lightbulb say? Just mark the method as non-static (remove static keyword), because the field accounts cannot be marked as a static. And static methods cannot access non-static fields
Barroso
BarrosoOP2d ago
i put this way kknow worked
No description
Buddy
Buddy2d ago
Or just remove the static keyword from the CreateAccount method

Did you find this page helpful?