Format 문자열의 정확한 문법. 차지하는 글자수를 정할 수 있는 옵션이 있는 줄은 미처 몰랐다.

A format item has the following syntax:
{index[,alignment][ : formatString}
Brackets denote optional elements. The opening and closing brackets are required. A format item has the following elements:
index
The zero-based index of the argument whose string representation is to be included at this position in the string. If the argument is null, an empty string is included at this position in the string.
alignment
A signed integer that indicates the total length of the field into which the argument is inserted and whether it is right-aligned (a positive integer) or left-aligned (a negative integer). If alignment is omitted, the string representation of the corresponding argument is inserted in a field with no leading or trailing spaces.
formatString
A format string that specifies the format of the corresponding argument's result string. If formatString is omitted, the corresponding argument's parameterless ToString method is called to produce its string representation. If formatString is present, the argument referenced by the format item must implement the IFormattable interface. Types that support format strings include the following:
원문

댓글

이 블로그의 인기 게시물

Oracle NLS_DATE_FORMAT 변경

Stop console process using Ctrl+C.

Alternative to IValueConvert, QuickConverter