M
mp
if i have a sequence of individual characters coming at me as inputs,
and i want to combine them into a string as output,
what's the preferrable implementation?
arraylist? stringbuilder? array? string?
number of characters is unknown so "array/collection" has to grow as needed
private void AddCharacterToString(char inputChar)
{
privateMemberObject.Add(inputChar);
or
privateMemberObject.Append(inputChar);
}
privateMemberObject.ToString() <--- final output
thanks
mark
and i want to combine them into a string as output,
what's the preferrable implementation?
arraylist? stringbuilder? array? string?
number of characters is unknown so "array/collection" has to grow as needed
private void AddCharacterToString(char inputChar)
{
privateMemberObject.Add(inputChar);
or
privateMemberObject.Append(inputChar);
}
privateMemberObject.ToString() <--- final output
thanks
mark