티스토리 뷰
string to int
int.Parse(문자열);
string + int
a = 10, b = 1이라는 값을 가지는 두 int형 변수가 존재한다고 가정할 때,
콘솔 창에 "Two number is 10 and 1"을 출력하는 방법 두 가지
1. string.Format(“Two number is {0} and {1}”, a, b);
2. $“Two number is {a} and {b}”;
'C#' 카테고리의 다른 글
[C#]out (0) | 2023.07.04 |
---|---|
[C#]ref (0) | 2023.07.04 |
[C#]상수와 열거 (0) | 2023.07.04 |
[C#]서론 (0) | 2023.07.04 |
[C#]var 타입 (0) | 2023.07.04 |