Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class StringToInt
- {
- static void Main()
- {
- int number = 2345;
- string str = "" + number;
- Console.WriteLine(str); //2345
- int num = 2345;
- string str2 = num.ToString();
- Console.WriteLine(str2);//2345
- int c = 123;
- string input = Convert.ToString(c);
- Console.WriteLine(input);//123
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement