stringcollection

System.Collections.Specialized.StringCollection settings work fine in Debug and Release but crash on Deployment?

时光怂恿深爱的人放手 提交于 2021-01-29 08:50:46
问题 For my latest WPF application, I've been using an System.Collections.Specialized.StringCollection to save and load strings. My current system works like a charm in Debug and Release, but when deployed to ClickOnce, the application crashes as soon as anything involving the settings are involved (loading or saving)! However, System.Collections.Specialized.StringCollections work just fine on their own if not a setting. What could be causing these crashes? Here are my systems: public static void

Performance concern: StringCollection vs List<String>

对着背影说爱祢 提交于 2019-12-03 06:22:53
问题 I was wondering when I should use List< string > and when I should use StringCollection . Let's say that I have to deal with large number of strings (like text files of 10mb). I know that List< T > provides more powerful functions than StringCollection . But sometimes I kind of find the List< T > slow when for example telling a Gridview that its datasource is a List< String >... So do anyone know the pros and cons of these collections, concerning speed and weight in memory? Concerning their