Skip to content

CC6494: Update interpolated-strings.md #41 [AUTOMATED] #3456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 19, 2017

Conversation

carolinacmoravia
Copy link
Contributor

Hi, @BillWagner,
This proposed file change comes from: https://github.com/dotnet/docs.ko-kr/pull/41/files.
Could you help to review this and merge this?
Many thanks in advance.

Hi, @BillWagner, 
This proposed file change comes from: https://github.com/dotnet/docs.ko-kr/pull/41/files. 
Could you help to review this and merge this?
Many thanks in advance.
@rpetrusha
Copy link
Contributor

Thanks, @carolinacmoravia. If you've made this change in one or more localized versions, there's an additional change that needs to be made. In the description of the variables on line 22, date also needs to be changed to hours.
I'll merge this when the build completes, since I made the additional change in this PR.

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does improve the clarity, but the change also introduced two coding errors that should be fixed before we merge this.

@@ -17,12 +17,12 @@ Used to construct strings. An interpolated string looks like a template string
The arguments of an interpolated string are easier to understand than a [composite format string](../../../standard/base-types/composite-formatting.md#composite-format-string). For example, the interpolated string

```csharp
Console.WriteLine($"Name = {name}, hours = {date:hh}");
Console.WriteLine($"Name = {name}, hours = {hours}:hh");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change introduced a coding error:

{hours}:hh

should be:

{hours:hh}

Otherwise, the variable won't be formatted correclty.


```csharp
Console.WriteLine("Name = {0}, hours = {1:hh}", name, date);
Console.WriteLine("Name = {0}, hours = {1}:hh", name, hours);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above. This should be:

{1:hh}

@mairaw
Copy link
Contributor

mairaw commented Oct 18, 2017

I've addressed your feedback @BillWagner. Take a look!

@BillWagner
Copy link
Member

Thanks @mairaw This is ready to :shipit: when the build finishes.

@BillWagner BillWagner merged commit 3155b60 into dotnet:master Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants