简体   繁体   中英

Format string placeholders

Do format string placeholders have a more technical name?

For example,

int currentYear = DateTime.Now.Year;
Console.WriteLine("The current year is {0}.", currentYear);

If you were reading this code out loud, or to yourself, how do you read the placeholder? Is there a correct term for representing them?

It's called Format Item . Check Composite Formatting .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM