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?

有帮助吗?

解决方案

(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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top