This code is simply a testing file so I can figure out how to make this work.
In this file I created the class Hero with three int values id, lvl, hp. A friend explained how to set this up so that I can create objects via this class. I'm not sure why the int's need to be declared three times or what the 'this' statement does or why it is needed, an explanation on this would be nice but not necessary at the moment.
What I'd like to do in this file is allow the user to pick a Hero. line 29 creates the Hero list, line 30 and 31 allow user input. 33 and 34 are objects, the test Hero's named dee and goo.
Lines 37 and 47 are my various attempts at getting trying to get the listing to appear and for me and to be able to select something in the list but unfortunately the foreach and for don't work, I tried LinqQuery but I'm not even sure how that works.
On lines 57 to 61 you can see testing on object manipulation but unfortunately it's hard coded to the first Hero 'dee'. I don't know what I would type in instead to allow for a more generic object value changes depending on which Hero was selected.
Please I am a beginner at C# coding and I do not understand all the terms so please if possible answer in layman's terms so I can understand better.
Thank you.