3 ms·
String.Format("Is {0} to read {2} {1} of the {3} out of place", "harder", "half", "because", "string is").
by martindevans 8y ago
String.Format("Is {0} to read {2} {1} of the {3} out of place", "harder", "half", "because", "string is").
- chrismeller 8y agoIronically that’s actually also one of the key advantages of it. If you have a long string with many placeholders in it and need to add a new one in the middle... you just add it and don’t have to figure out where in the list of params to insert the new arg.
- moomin 8y agoNot so nice for the next guy, though.
- contravariant 8y agoThis is not much of an advantage with respect to string interpolation as you could just as easily put your new value in a (nicely named) variable and insert it wherever.
- EpicEng 8y agoYes, God forbid the variable appear more than once.