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.

1
  • A collection is always ordered (apart from those which implement ISet<T>, IDictionary). Commented Oct 7, 2014 at 7:17

1 Answer 1

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!

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.