C# C# Streams and Data Processing Streaming Data on the Net Deserialize the News Results

Cathal Kenneally
Cathal Kenneally
5,734 Points

Please Help Can't pass this quiz

Complete the following code in order to produce a string that prints the "I like apples and oranges, but I don't like bananas."

string.Format("I like {} and , but I don't like .", "apples", "oranges", "bananas")

I have tried using {0} {1} {2} but to no avail. What am I doing wrong?

2 Answers

Subhadeep Ray
Subhadeep Ray
12,933 Points

I'm not sure about the exact line of code you used.

Anyway, the correct answer should be: var message = string.Format("I like {0} and {1}, but I don't like {2}.", "apples", "oranges", "bananas");

Steven Parker
Steven Parker
171,327 Points

It sounds like you have the correct answer, but you didn't show the line with the blanks filled in that way.

Try again, and if you still have trouble, be sure to copy the line with your answers filled in and paste it here.