Advertisement
BorislavBorisov

! Варианти от int в string

Sep 27th, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. using System;
  2. class StringToInt
  3. {
  4.     static void Main()
  5.     {
  6.         int number = 2345;
  7.         string str = "" + number;
  8.         Console.WriteLine(str); //2345
  9.  
  10.         int num = 2345;
  11.         string str2 = num.ToString();
  12.         Console.WriteLine(str2);//2345
  13.  
  14.     int c = 123;
  15.         string input = Convert.ToString(c);
  16.         Console.WriteLine(input);//123
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement