FormattableString.Format Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the composite format string.
public:
abstract property System::String ^ Format { System::String ^ get(); };
public abstract string Format { get; }
member this.Format : string
Public MustOverride ReadOnly Property Format As String
Property Value
The composite format string.
Remarks
A composite format string consists of zero or more runs of fixed text intermixed with one or more format items, which are indicated by an index number delimited with brackets (for example, {0}
). The index of each format item corresponds to an argument in an object list that follows the composite format string. For example, in the following statement:
String.Format("Name = {0}, hours = {1:hh}", name, DateTime.Now);
String.Format("Name = {0}, hours = {1:hh}", name, DateTime.Now)
String.Format("Name = {0}, hours = {1:hh}", name, DateTime.Now)
the composite format string is "Name = {0}, hours = {1:hh}"
.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기