- #1
Sojourner01
- 373
- 0
For some reason, I can't work out how to set every element of an array to the same value in a single line, in C#. For example, I can't do this:
char[] array_of_chars = new char[limit];
array of chars[] = X
or:
char[] array_of_chars = new char[limit];
array of chars[0:limit] = X
So how is it done? Can it be done, or do I have to iterate? If so, that's a very stupid omission from the language.
char[] array_of_chars = new char[limit];
array of chars[] = X
or:
char[] array_of_chars = new char[limit];
array of chars[0:limit] = X
So how is it done? Can it be done, or do I have to iterate? If so, that's a very stupid omission from the language.