Can we convert Int to string? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can we convert Int to string?

18th Jun 2016, 5:12 AM
Shashwat Kadam
Shashwat Kadam - avatar
2 Answers
+ 4
There are 2 simple ways: 1. int num = 10; string numStr = num.ToString(); 2. int num = 10; string numStr = "" + num; -- Hope that helps :) Goodluck!
18th Jun 2016, 12:04 PM
erwinmesi
erwinmesi - avatar
+ 3
int a=7; string b=Convert.ToString(a); that should do it,i think.
18th Jun 2016, 9:03 AM
john carter