5
Answers

conversion of datatypes

wgen we used to convert data types in c#?

Answers (5)

1
Photo of Rafnas T P
NA 12.2k 435.7k 8y
we will will convert data type when we require to convert,
for examle, 
we have one integer value and one double value and we need to multiply this and we have to display in textbox then we need to calculate this two and  convert this to string and assign to text box like below
int a=1;
double b=2.5;
txt_Total.Text= Convert.ToString(a*b);
 
1
Photo of Joginder Banger
NA 10k 490.8k 8y
In google lots of link available. but I shared hope you like it.
 
http://www.dotnettricks.com/learn/csharp/understanding-type-casting-or-type-conversion-in-csharp
 
http://www.c-sharpcorner.com/uploadfile/puranindia/type-conversions-in-C-Sharp/
 
https://www.dotnetperls.com/cast
 
1
Photo of Dhananjay Kumar
NA 1.1k 8.7k 8y
You need to learn this articles first :-
 
https://msdn.microsoft.com/en-us/library/yz2be5wk.aspx
 
https://www.tutorialspoint.com/cprogramming/c_type_casting.htm 
0
Photo of Saquib Siddiqui
NA 5 265 8y
in which case we need to convert data types e.g int to string?
0
Photo of Joginder Banger
NA 10k 490.8k 8y
are you sure is this a question?