Skip to content
eric langlois edited this page Nov 26, 2020 · 14 revisions

Welcome to the RomanNumerals wiki!

Learning C#

Katas, like this one, are perfect to start learning a new programming languages.

  • learned about many languages features and quirks
  • Learned about test support in the language

Things I've learned

Arrays are objects that are initialized at runtime

const

Can only be applied to constant expressions and not to variables or methods.

The compiler must be able to fully evaluate the const at compile time.

Const expressions can be used inside other const expression.

readonly

and collections

ReadOnlyCollection

Arrays

  • are full objects and not an addressable region of continuous memory as in C or C++.
  • cannot be initialized at compile time and thus, cannot be const.

Marking an array readonly

  • will only prevent the reference from being modified.
  • won't prevent its individual elements from being modified. Use a ReadOnlyCollection<> for that purpose.