exercism / exercism/csharp

Add new reference document: readonly vs const

Aperta
#1,442 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
427
Fork
383
Merge medio
2g 2h
PR unite (30g)
5

Descrizione

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

This issue describes how to add a new [C# reference document][reference]: 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:

- What values they can be applied to.
- Readability aspects.
- Performance characteristics.
- Memory aspects.
- Generated IL code (optional).

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

## Resources to refer to

- [StackOverflow - static readonly vs const][stackoverflow.com]

## Contributing

To create the reference, please:

- [Create the document at `language/csharp/reference/readonly-vs-const.md`][new-document].
- Remove the corresponding TODO item in the [reference README][reference].
- Add a link to the reference document in the [reference README][reference].

[stackoverflow.com]: https://stackoverflow.com/questions/755685/static-readonly-vs-const#755693
[reference]: https://github.com/exercism/v3/blob/master/languages/csharp/reference/README.md#reference-docs
[new-document]: https://github.com/exercism/v3/new/master?filename=languages/csharp/reference/readonly-vs-const.md

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.