Pull Request - PR #2209 - C# Strings Exercise - Adding Console.WriteLine() to the String Interpolation

Hello Exercism Community Forum,

I recently revisited the C# strings exercise and tried to use string interpolation. I saw the “$” and tried to use that in my exercise and ran into a compile error and saw that I had to add the Console.WriteLine() in order for it to work. I thought because I had this small issue, perhaps some other beginner might bump into this also. I then thought it would be a good reason to try and contribute the open-source community.

I have never done a contribution to any project before this seems like the smallest possible contribution one can do to get started. I went through the forking process on GitHub and made the change and the pull request. Shortly after I got the reply e-mail saying I should create a Community post to get other members to discuss this. So I’m doing that now.

I know this is super small and a very uncritical thing, but I just want try and contribute to something larger than myself and learn more about the process of open-source communities as I have never really done so in the past. I have used FOSS software and services before but never really took the time to contribute. I would like to start the process of learning how to give back rather than just take.

Regardless of the outcome I think this is an interesting and cool process.

Console.WriteLine() is used to write a string to the output.

String Interpolation is used to create strings.

You can use string interpolation to create strings which you want to write to output, but writing to output and string interpolation are separate topics.

The example shows the generated string, not what is printed to standard out.

If we did want to print the string (something the track maintainer would need to weigh in on), it would be good to be consistent and do it across both examples!

1 Like

Thanks for the post and welcome to FOSS! :slight_smile:

Could you link to the PR pls?

1 Like
1 Like

Yeah, I agree with this. Throughout Exercism (and docs in general) we use the commenting paradigm to show what’s been output from the previous line. So I don’t think the Console.WriteLine() is necessary/appropriate here. Does that make sense?

1 Like

Oh okay! I understand the purpose of the existing format now. Right on, it’s all good. I learned something so I see this as a win. Thanks for the feedback @IsaacG and @iHiD.

I think this has been good experience in the since that I learned something about Git Commits and Pull requests and how/why something gets added or not added.

Thanks again y’all! :grinning:

1 Like