I need to create a property tha will hold to ints for example
int age and int numbers so.. something like This data is comming from a function in another class that returns a DataSet, in the data set there will be those two items like:
Age number
24 1
29 6
32 2
27 1
19 3
So like I said, at the end I would like to have a property that contains this data and can reference at any time from different classes
so I am not sure what to use to hold that data, but it would be something like
public <int, int> personData
{
get
{
return _personData;
}
set
{
_personData = value;
}
}
so I do not know what to use for _personData and for . And how can I access the values of such solution
I would appreciate your help
Looks like a
Dictionary<int, int>will do it for you.and to access values, you can do