In C # .net all the data types are predefined structure.
char c; Char is a structure and c is a structure variable.
The structure contains a collection of methods.
The structure will be stored in stack memory.
As per the above statements, every data type contains a collection of pre-defined methods.
These core tutorials will help you to learn the fundamentals of .NET. For an in-depth understanding and practical experience, explore Online ".NET Training"
Example:- A program to point data type limits open window forms application project
(File new projectvisual C # window forms application)
Observations: - A window will be opened, which is called as a form
Open Tool Box (view menu Tool Box)
Place a button on the form
Code for button click event Private void button1_ click
{
Message Box. Show ( Int. Max value . To String ());
Message Box. Show ( Int. Min value . To String ());
}
Output
2147483647 -2147483648 Execute the project Write line () is used to display a message in Console Application. Message Box. Show () is used to display a message in the windows form application
Example on Parsing
Open window forms application project Place two text boxes and a button Code for button 1 click
Note
The value typed in text box 1 as called as text box1 .text Button1
Click here
Message box. Show (text box 1. Text + text box 2. Text);
Int Sal = int. parse (text box 1. Text);
Int inc = int. parse (text box 2. Text);
Int total = sal + inc;
Message Box. Show (total . to string ());
(or)
Message Box. Show (total + “”);
Execute the project
Observations
In C #, message Box. Show () is capable to point only string
‘+’ operator is used to add numbers and to concatenate string.
10 + 20 = 30
“10” + “20” = 1020 “
10” + 20 = 1020
You liked the article?
Like : 0
Vote for difficulty
Current difficulty (Avg): Medium
1/15
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.
Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox