1

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,

Rob
  • 26,989
  • 16
  • 82
  • 98
Learning Xamarin
  • 547
  • 3
  • 11
  • 25

1 Answers1

1

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());

enter image description here

sujith karivelil
  • 28,671
  • 6
  • 55
  • 88