Given the following code:
string a = "example"; string b = "blah {0}", a; I was led to believe that using {0} or {1}, that it would put whatever is after the comma, in this case string a, so "example". String b should be "blah example". When I do this I get the error "string a is already declared".
Why does it think that I'm declaring a string in this context?
String.Formatfunction. Alas, C# has no language syntax for string interpolation, cf. Ruby"There are #{apples.count} fruit"or Python"There are %s fruit" % apples.count"