Hi All,

I have just started learning C# and would like to populate a combo box with the list of games defined in gameslist.txt file.

below is the format of gameslist.txt file

[category 1]
game 1
game 2
game 3
game 4

[category 2]
game 5
game 6
game 7

[catergory 3]
game 8
game 9

In my GUI Application, I have 2 combo boxes, first combo box will have the category list like [category 1 / category2/ category 3...] and now in the second combo box i should populate only list of games for the particular category selected from the first combo box like [ game1/game2/game3.....].


Plese help... Thanks in advance.

Hi there,

If your just starting to learn C# I suggest you (we all do) to try solving your problem, write the code and make it work. If there are errors you can't figure out or anything then post the relevant code within the code tags and ask what you don't understand, this is the only way to do it. If we just post the solution you won't learn from that. Please go ahead and try it, good luck! :)

commented: exactly right! If you copy and paste our solutions you only improve your ability to copy and paste :p +3