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
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per