1. 문자열을 char 배열로 변환
char[] temp = "Hello World!".ToCharArray();
//결과 값
temp[0] = 'H'
temp[1] = 'e'
temp[2] = 'l'
temp[3] = 'l'
temp[4] = 'o'
temp[5] = ' '
temp[6] = 'W'
temp[7] = 'o'
temp[8] = 'r'
temp[9] = 'l'
temp[10] = 'd'
temp[11] = '!'
2. char배열을 문자로 변환
string temp1 = new string(temp);
//결과 값
temp1 = "Hello World!"
'C#' 카테고리의 다른 글
[C#]ref 예제 (0) | 2016.03.28 |
---|---|
[C#]Mouse Drag and Drop Control 생성 예제 (0) | 2016.03.25 |
[C#]SqlConnection 예제 (0) | 2016.03.24 |
SATO Barcode Command(SBPL) (0) | 2016.03.24 |
[C#]DataTable Sort 예제 (0) | 2016.03.23 |