Performance concern: StringCollection vs List

I would personally prefer to use List<string>:

  • No need to remember one specific type just for strings
  • It implements the generic IEnumerable<T> rather than just IEnumerable, and thus supports LINQ
  • It’s supported in SilverLight
  • It’s more idiomatic for most developers (IMO)

I would be really surprised to find StringCollection to be significantly faster than List<string> – see if you can back that up with numbers. My only cause for hesitation is that GridView could potentially have hard-coded support for StringCollection to make it fast with that type – but that sounds pretty unlikely to me.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)