CSharp forms application 3

CSharp forms application 3

form1

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:

form2

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:

form3

Click the button and see the result:

form4

Syed Adeel Ahmed
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.

Published by

Syed Adeel Ahmed

Computer Systems Engineer from Sir Syed University Of Engineering & Technology.I am passionate about all types of programming.

Leave a Reply