(Assuming C# is the language)
You can use a List<object>
to store the values. And while retrieving the values you have to cast those properly.
Question
I want to store values of different data types in a list and retrieve them as it is, such as:
1. 5
2. True
3. PersonName
4. 0.325
is it possible?
Solution
(Assuming C# is the language)
You can use a List<object>
to store the values. And while retrieving the values you have to cast those properly.