반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Google Excel
- Kotlin
- numpy
- Mac
- google apps script
- list
- Redshift
- Apache
- string
- hive
- Github
- Tkinter
- GIT
- matplotlib
- Excel
- math
- SQL
- PostgreSQL
- PySpark
- django
- Python
- 파이썬
- Java
- Google Spreadsheet
- c#
- array
- PANDAS
- gas
- dataframe
Archives
- Today
- Total
달나라 노트
C# : +, Concat (문자열 연결) 본문
728x90
반응형
문자열의 연결은 + 연산자를 이용해서 할 수 있습니다.
using System;
class MyProgram
{
static void Main()
{
string test1 = "Apple";
string test2 = "Banana";
string new_string = test1 + test2;
Console.WriteLine(new_string);
}
}
-- Result
AppleBanana
using System;
class MyProgram
{
static void Main()
{
string test1 = "Apple";
string test2 = "Banana";
string test3 = "Watermelon";
string new_string = string.Concat(test1, test2, test3);
Console.WriteLine(new_string);
}
}
-- Result
AppleBananaWatermelon
string class의 Concat method를 이용해도 문자열의 연결을 할 수 있습니다.
728x90
반응형
'C# > C#' 카테고리의 다른 글
C# : 문자열 indexing (0) | 2022.03.23 |
---|---|
C# : interpolation (문자열 format 기능 사용하기) (0) | 2022.03.23 |
C# : Math.Round (반올림), Math.Ceiling (올림), Math.Floor (내림) (0) | 2022.03.23 |
C# : Math.Abs (절대값) (0) | 2022.03.23 |
C# : Math.Sqrt (제곱근) (0) | 2022.03.23 |
Comments