RhythmAddict112
Programmer
Greetings,
I need your advice on something here. I'm currently working on an application where I need to maintain a collection that will store a string value and an associated value of type double.
Example:
"Requirements" .2
"Code" .4
..etc
Essentially, project phases and their associated weights. I'd like to use a collection that will allow me to reference either the string value, or the double ("weight") by an index. What kind of collection should I be using?
Currently, Im using 2 arrays...I just don't like the fact that they're independant of one another..
ex:
double[] yWeights = { .2, //Requirements
.2, //Design
.05, //Complete
.05, //Test
.2, //Analysis
.1, //UAT
.4 }; //Code
string[] xValues = { "Requirements",
"Design",
"Complete",
"Test",
"Analysis",
"UAT",
"Code" };
thanks in advance - let me know if I'm not makin sense
I need your advice on something here. I'm currently working on an application where I need to maintain a collection that will store a string value and an associated value of type double.
Example:
"Requirements" .2
"Code" .4
..etc
Essentially, project phases and their associated weights. I'd like to use a collection that will allow me to reference either the string value, or the double ("weight") by an index. What kind of collection should I be using?
Currently, Im using 2 arrays...I just don't like the fact that they're independant of one another..
ex:
double[] yWeights = { .2, //Requirements
.2, //Design
.05, //Complete
.05, //Test
.2, //Analysis
.1, //UAT
.4 }; //Code
string[] xValues = { "Requirements",
"Design",
"Complete",
"Test",
"Analysis",
"UAT",
"Code" };
thanks in advance - let me know if I'm not makin sense