Pergunta

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?

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top