You'll want to pass the reference to the list by value, not by reference:
private void GetChars(List<char> charsToPopulate)
Apart from that, your code is fine. Using lists for primitive types such as char
is very common.
If you're interested in writing the same implementation slightly different, you could use LINQ to populate the list from the things:
{
charsToPopulate.AddRange(from t in things select t.CharSymbol);
}
BTW, there is nothing wrong with creating the list within the method. You don't need to 'allocate' the list before passing it to the method:
private List<char> GetChars()
{
List<char> charsToPopulate = new List<char>();
foreach(Thing t in Things)
{
charsToPopulate.Add(t.CharSymbol);
}
return charsToPopulate;
}
or using LINQ:
private List<char> GetChars()
{
return things.Select(t => t.CharSymbol)
.ToList();
}