Console.WriteLine1 [C#] Console.Writeline 좌/우 정렬, 문자 채우기, 소숫자리 출력 출처 : 쇼크리더님 http://ramses8.tistory.com/ 베베님 : http://blog.stevex.net/string-formatting-in-csharp/ 월화수목금금금 : http://dps-r.tistory.com/36 1. 원하는 길이로 좌측/우측 정렬시킨후 나머지 공간을 다른 문자로 채우기 (기본은 공백) String.PadLeft(길이, [문자]); String.PadRight(길이, [문자]);예) string str1 = "asdf"; string str2 = str1.PadLeft(10); --> str2 = " asdf" string str3 = str1.PadRight(6, '-'); --> str3 = "asdf--" str2 웹에서 보면 빈칸이 안나오기에 그냥 as.. 2013. 4. 4. 이전 1 다음