I create a new asp.net custom control. This control get its data via a list of string.
Now I want to know what is the better solution for me? storing List<String> or string[] ?
I create a new asp.net custom control. This control get its data via a
Share
Based on this answer to another question, you’d be better off storing it as an array, as the list itself adds some storage overhead.
Whether or not you create a list out of the array after you retrieve it from the viewstate is up to you.
To those saying “use a list, it gives you more niceties than an array” – once the collection is in the ViewState, it doesn’t matter whether it has nice
Addmethods or not.