string (2) 썸네일형 리스트형 c#에서 String.Format 형식 타입 지정하기 MSDN을 검색하다 굉장히 유용(?) 할것 같은 예제가 있길래 퍼왔다. 출저는 발켰으니 괜찮겠지.. 친절하게 MSDN에 소스 복사하기까지 있으니까 ㅡㅡ; // This code example demonstrates the String.Format() method. // Formatting for this example uses the "en-US" culture. using System; class Sample { enum Color {Yellow = 1, Blue, Green}; static DateTime thisDate = DateTime.Now; public static void Main() { // Store the output of the String.Format method in a stri.. char[ ] -> string, string -> char[ ] 아래와 같이 char배열에서 string으로 string에서 char로 형변환 할 수 있다. 보너스는 char 배열 넘기기~ (복사해서 넘긴다. 주소를 넘기려면 ref를 사용) string str = "12345"; char[] temp_str; temp_str = str.ToCharArray(); // string -> char [] Rcv_Char_arr(temp_str); protected void Rcv_Char_arr(char[] arr) { string str = new string(arr); // char[] -> string } 이전 1 다음