开发者

C# : Data collection to keep string?

开发者 https://www.devze.com 2023-01-28 22:40 出处:网络
Any Data Collection to keep the strings? I want t开发者_JAVA技巧o know any other data collection that can keep string, because enum cannot keep string.List<string>

Any Data Collection to keep the strings? I want t开发者_JAVA技巧o know any other data collection that can keep string, because enum cannot keep string.


List<string>

Or

StringCollection

Should do...

http://msdn.microsoft.com/en-us/library/system.collections.specialized.stringcollection.aspx

http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx


How about ICollection<string> or List<string> or a static array of strings (string[])?


System.Collections.Specialized.StringCollection


If you decide to go with WPF or Silverlight and need to databind to it then you should use

ObservableCollection<string>

Although I should point out that string is not mutable.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号