In the simplest term, you can call it a placeholder.
So, you have something like this {0}, {1}, {2}, now because you have 3 placeholders, you will pass 3 more values to the function.
These values will be inserted at the place of a placeholder in exact same order as they are passed. This is to avoid complex concatenation logic and an unreadable code.
So instead of:
"Hello " + custName + ", Your invoice number : " + intInvoiceNumer.ToString() + " must be paid by " + dateDueDate.ToString()
You can write:
("Hello {0}, Your invoice number : {1} must be paid by {2}", custName, intInvoiceNumer, dateDueDate)
You may also look into String.Format function on which above is based.
Nitin SontakkePosted Nov 30, 2016, 10:36 PM
Bikesh SrivastavaPosted Nov 30, 2016, 8:53 AM
Khaja MoizuddinPosted Nov 30, 2016, 8:06 AM
Ravi PatelPosted Nov 30, 2016, 7:19 AM