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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om