❔ As loop value increments, increment variable name
I have a loop to insert values into 5 objects of employees named employee1,employee2...
Is there a way I can make the loop update the number in the variable name after each iteration?
I am very new to C# so I am looking for any sort of help.
3 Replies
No, but you could store the employees in an array instead of separate variables
Thank you very much 🙂 I was thinking of using an array however I trying to find out if C# had the capability of doing what I requested.
Thank you again.
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.