c# - Can we add any type of value in the list object? -


Can we add any type of value to the list object?

Like we

from the list & lt; String & gt; Str = new list & lt; String & gt; ();

Only the string value can be added to the list. But I want to add any type of value like string, decimal.

Then you can not use any common type of list. Use ArrayList or even you list & lt; Object & gt;


Comments