I'm doing some self paced learning and ran into this line of code that I'm not 100% certain I understand.
This is for a C# problem I'm working on. I know that the line is declaring the variable 'array' and saying that it is a new instance of this object. I'm confused about:
- Is this stating that the array will contain characters as its' data type?
- How the
.Lengthoperator being used here? Is this saying that the data that each cell is storing is number of characters, and not the characters themselves, in each cell of the array?
Code:
var array = new char[name.Length]