0

I have a string array of information that I need to pass from one user control to the other. The application settings contains a System.Collection.Specialized.StringCollection datatype for such cases. But since I need to use my array in a specific order, does a string collection help? Apart from that is it even a good idea to save such parameters in the application settings or is there a better way of passing these arguments around the program? I have used EventListeners in the program as well but passing arguments from one user control to the other seems less convenient with them.

disasterkid
  • 6,948
  • 25
  • 94
  • 179

1 Answers1

2

StringCollection is ordered in the way you inserted, so that would be sufficient for you.

As a tip: you can edit the Settings.settings file to change the data type of any field:

<Setting Name="Setting" Type="System.String[]" Scope="User">
  <Value Profile="(Default)"></Value>
</Setting>

Be advised that the type you define must the XML serializable!

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325