CSharp forms application 3

Posted by

CSharp forms application 3

In our CSharp forms application 3, we will use a textbox, a label and a button. Whenever a user presses a button, a text inside the textbox is displayed on the message box.
We will use the technique of string concatenation in this application.Concatenation is the procedure of affixing one string to the end of another string. When you concatenate string literals or string constants by utilizing the + operator, the compiler makes a solitary string. No run time connecting happens. Then again, string variables can be linked just at run time. For this situation, you ought to comprehend the execution ramifications of the different methodologies.

We will now, just code the click event of the button as follows:

Why we use if and else in C#?

An if distinguishes which proclamation to run in light of the estimation of a Boolean statement. In the accompanying sample, the Boolean variable result is situated to hold the true value and after that weighed in the if explanation. If we enter some value inside the textbox, then the if statement gets justified and the if block is executed

An else statement executes its block if our if condition fails
Finally, run the application, and enter your name in the textbox as follows:

Click the button and see the result:

Facebook Comments

Syed Adeel Ahmed
Analyst, Programmer, Educationist and Blogger at Technofranchise
Computer Systems Engineer from Sir Syed University Of Engineering & Technology.I am passionate about all types of programming.
Syed Adeel Ahmed on FacebookSyed Adeel Ahmed on GoogleSyed Adeel Ahmed on InstagramSyed Adeel Ahmed on Twitter