I\'d need to store a language code string, such as \"en\", which will always contains 2 characters.
Is it better to define the type as \"String\" or \"Char\"?
<
String just implements an indexer of type char internally and we can say that string
is just equivalent to char[]
type with lots of extra code to make it useful for you, hence, like an array, it is stored on heap always.
An array cannot be manipulated without allocating it new space, same will be the case of a string hence, it is immutable
String implements IEnumerable
Noticeable point: When you pass a string to a function, it is a pass by value unless there is a use of ref