Most Efficient to pass a collection of Char to method for population

Posted by guazz on Stack Overflow See other posts from Stack Overflow or by guazz
Published on 2010-04-23T22:55:44Z Indexed on 2010/04/23 23:03 UTC
Read the original article Hit count: 271

Filed under:
|

Is this the best way to get a collection of chars? Wondering is it overkill to use List for primitives such as char?

private void GetChars(ref List<char> charsToPopulate)  
{  
    foreach(Thing t in Things)  
    {  
       charsToPopulate.Add(t.CharSymbol);  
    }  
}  

© Stack Overflow or respective owner

Related posts about c#

Related posts about collections