Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8223427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:41:35+00:00 2026-06-07T14:41:35+00:00

Im still new to C# and was wondering how one would have multiple things

  • 0

Im still new to C# and was wondering how one would have multiple things happen when an if condition is met. for example.

int number = (Convert.ToInt32(textbox1.text)); 
   if (number == 1)
         textbox2.Text = "1";                 
         number2 = 33;           
         textbox3.text = (Convert.ToString(number2));

When I do something like this it dosnt complete all the desired results.

P.S If this isnt the right site to go for newbie questions like this does anyone know where I can go? (after research of course).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T14:41:38+00:00Added an answer on June 7, 2026 at 2:41 pm
    if (number == 1) 
    {
        textbox2.Text = "1";                 
        number2 = 33;           
        textbox3.text = (Convert.ToString(RSP));
    }
    

    Add brackets to group statements together.

    Without the brackets, the if-statement will ONLY affect the very next statement: textbox2.Text = "1";, and the other statements will always be run, regardless of the if-statement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am still new at SAS and I was wondering how I can do
I am still new to Objective C and I was wondering if there were
Ok, I'm still new to using C sockets, but I was wondering if there
I'm still quite new to CodeIgniter and I was wondering, where should I place
I am still a little bit new to C# and I was wondering how
still new to XML parsing with the iphone so i have a few questions.
Very new to web programming still and I don't really have a specific question
I was wondering how I would go about accessing one instance of a class,
I am still new to Yii and wondering how to return JSON from the
I was wondering how hard it would be to make the new Tasks.Dataflow blocks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.