exercism / csharp

Exercism exercises in C#.
https://exercism.org/tracks/csharp
MIT License
349 stars 350 forks source link

Add new reference document: readonly vs const #1442

Open ErikSchierboom opened 4 years ago

ErikSchierboom commented 4 years ago

[C#] Add new reference document: readonly vs const

This issue describes how to add a new C# reference document: readonly vs const.

Description

The goal of the new reference document is to explain the different between (static) readonly fields versus const fields, which is confusing to many students.

The document should explain how the two approaches are different, taking into account:

Based on the aforementioned differences, the document should provide guidance on when to use which approach and why.

Resources to refer to

Contributing

To create the reference, please:

Kavignon commented 4 years ago

I can help here! What would you like to see for instance?

ErikSchierboom commented 4 years ago

@Kavignon great! Shall I assign the issue to you?

As for what is expected, this issue lists all the information we'd like to see in the document. The document itself could look like this document.

Kavignon commented 4 years ago

Sounds good to me!

Kavignon commented 4 years ago

Assign it to me!

ErikSchierboom commented 4 years ago

@Kavignon Done.

ErikSchierboom commented 4 years ago

@Kavignon Just checking up on your progress. Do you need any help?

mikedamay commented 4 years ago

Can we include readonly structs and members in this exercise.

ErikSchierboom commented 4 years ago

@mikedamay This is not an exercise but a reference document. Something like https://github.com/exercism/v3/blob/master/languages/csharp/docs/code_style.md or https://github.com/exercism/v3/blob/master/languages/csharp/docs/memory_allocation.md, which are contents we can use in exercises. Originally, we considered linking to these documents, but just including their contents in the exercise might be best at first.

mikedamay commented 4 years ago

copied my comment to the constants exercise exercism/v3#1044.