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

SQL Server 2008 - High Memory Usage

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

Problem In Configuring Biztalk 2009 In Creating A ReceivePort.When I Try To Create A Receive POrt I Got This Error