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

Tojo Alex
PRO
Tojo Alex
Pro Student 13,331 Points

Desperate help needed

Please could you tell me what is the answer for question 2 and 3. My head is completely aching from continuously watching the video.

string.Format("The current date and time is .", DateTime.Now)

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

10 Answers

Steven Parker
Steven Parker
171,227 Points

Replacement tokens in a "format" string are braces with the argument index number (starting at 0) inside them.

Both of the questions you asked about originally can be solved by adding normal tokens in the blank(s). For the one with multiple blanks, each token will have a different number in it.

The other date question requires a special formatting specifier. For that, you can use one of the standard date/time format strings described in the documentation page I just linked.

Here's an excerpt from that documentation page:

"f" Full date/time pattern (short time). :point_right: Monday, June 15, 2009 1:45 PM
"F" Full date/time pattern (long time). :point_right: Monday, June 15, 2009 1:45:30 PM
"g" General date/time pattern (short time). :point_right: 6/15/2009 1:45 PM
"G" General date/time pattern (long time). :point_right: 6/15/2009 1:45:30 PM

You want the single-letter format specifier that matches the description in the instructions.

I'll bet you can get it now. :wink:

Tojo Alex
PRO
Tojo Alex
Pro Student 13,331 Points

Sorry about that . Also in my question I said that I had a problem with this : string.Format("I like and , but I don't like .", "apples", "oranges", "bananas"). Well that was wrong,I have the answer to that question it is actually this one : string.Format("The current date is .", DateTime.Now.Date). Could you explain what to do here.

Steven Parker
Steven Parker
171,227 Points

I expanded my answer a bit more.

Tojo Alex
PRO
Tojo Alex
Pro Student 13,331 Points

I couldn't find anything that matched the instructions either that its not there or that I missed it (which probably is the reason why). I'm just really stressed because when I finish this I finish a whole track.

Tojo Alex
PRO
Tojo Alex
Pro Student 13,331 Points

I worked out the first one that I originally asked though the second one that I asked still confuses me.

Tojo Alex
PRO
Tojo Alex
Pro Student 13,331 Points

I worked out the answer thanks for assistance. The annoying thing though is that this test won't let you off 2 out of 3. The first question is what is getting on my nerves.(edited)

Steven Parker
Steven Parker
171,227 Points

I think passing a quiz requires 80%, so you can't get any wrong when the quiz has less than 5 questions.