How do I make several choices in a text box [C#]?


ok, i'm ridiculously new c#, , i'm trying make small text adventure game in it, don't know how 1 thing without making tons of separate lines of code.

here's code have right now:

if (textbox1.text == "left")
            {

                messagebox.show("you walk short while before coming upon building, enter or keep walking?");

            }

what i'm trying give them multiple things type in show same message box, can't remember how that, help?

not sure understood.  like this?

if (textbox1.text == "left" || textbox1.text == "right" || textbox1.text == "fly") {     messagebox.show( ... ); }


jose r. mcp
code samples



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user