C#: Which uses more memory overhead? A string or a char holding a sequence of a word?
I know a char is basically an array of each char to make up a word (if more than one char), but which would ultimately cause you more memory overhead like when using a string vs. a char to hold something the length of a word?
It would depend how many times you used the thing in question. The way .Net does strings is that if you had multiple strings with the same value then that value is only stored in memory once and each string variable points to that value. However each char array used would have its own memory allocation even if the contents of the char array were identical.
eg