1

Any Data Collection to keep the strings? I want to know any other data collection that can keep string, because enum cannot keep string.

Prince OfThief
  • 6,323
  • 14
  • 40
  • 53
  • 3
    Most collections can store any type of object. The difference between each type of collection is how those objects are stored/written/accessed. – Rob Elliott Dec 03 '10 at 17:35

4 Answers4

3
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

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
1

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

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
1

System.Collections.Specialized.StringCollection

Merky
  • 494
  • 2
  • 4
0

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.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
basarat
  • 261,912
  • 58
  • 460
  • 511