Reputation: 547
I need to compile a project in Visual Studio 2012, so it wont understand String Interpolation..
What would be the equivalent to:
var uri = $"{BaseUrl}{collection.ToQueryUriString()}";
using String.Format?
Thank you,
Upvotes: 1
Views: 289
Reputation: 29016
As you said and Rob mentioned in the comment, String.Format
will be the answer, it will Converts the value of objects to strings based on the formats specified and inserts them into another string.The equivalent code can be return as :
var uri=String.Format("{0}{1}", BaseUrl, collection.ToQueryUriString());
Upvotes: 1