Can I have a List containing one string and two numbers? Or I can only have one type of element?
If that's the kind of functionality you want, then I would look at the non-generic System.Collections.ArrayList
class.
Update
For those of you who aren't going to read the huge comment chain...it looks like Adam Robinson is on to something using List<object>
over ArrayList
. Both will work but on large collections it seems like List<object>
is measurably faster than ArrayList
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With