Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[C#] Implement new Concept Exercise: string-formatting #962

Closed
ErikSchierboom opened this issue Mar 20, 2020 · 3 comments
Closed

[C#] Implement new Concept Exercise: string-formatting #962

ErikSchierboom opened this issue Mar 20, 2020 · 3 comments
Assignees
Labels

Comments

@ErikSchierboom
Copy link
Member

ErikSchierboom commented Mar 20, 2020

This issue describes how to implement the string-formatting concept exercise for the C# track.

Getting started

Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:

Please also watch the following video:

Goal

The goal of this exercise is to teach the student the basics of the Concept of String formatting in C#.

Learning objectives

  • Know how to use the ToString() method to convert any object to a string.
  • Know how to use string interpolation on values of any type.
  • Know how to use default format strings to convert to standard output formats.
  • Know how to use custom format strings to convert to custom output formats.
  • Know that string.Format underlies string interpolation.
  • Know of the StringBuilder type and when to use it.
  • Know that string interpolation can interpolate any expression.

Out of scope

Nothing.

Concepts

This Concepts Exercise's Concepts are:

  • string-formatting: know how to use the ToString() method to convert any object to a string; know how to use string interpolation on values of any type; know how to use default format strings to convert to standard output formats; know how to use custom format strings to convert to custom output formats; know that string.Format underlies string interpolation; know of the StringBuilder type and when to use it; know that string interpolation can interpolate any expression.

Prequisites

This Concept Exercise's prerequisites Concepts are:

  • strings: strings will be formatted.
  • inheritance: knowing that each class derives from object and thus has built-in methods.

Any data types used in this exercise (e.g. datetimes) should also be added as prerequisites.

Resources to refer to

Hints

After

Representer

This exercise does not require any specific representation logic to be added to the representer.

Analyzer

This exercise does not require any specific analyzer logic to be added to the analyzer.

Implementing

To implement this exercise, please follow these instructions.

Help

If you have any questions while implementing the exercise, please post the questions as comments in this issue.

@mikedamay
Copy link
Contributor

Please have a look at the instructions.

This is based on Elixir's strings exercise.

Tasks 1 and 3 push towards string interpolation.

Task 2 pushes towards string.Format() and verbatim strings.

@ErikSchierboom
Copy link
Member Author

Yes, I like it! 👍

@mikedamay mikedamay removed the status/help-wanted Extra attention is needed label Jul 4, 2020
@mikedamay
Copy link
Contributor

closed with PR #1871

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants