I have an object with two different variables inside.
Looks like: ModelB.Text
and ModelB.Value
and ModelB.Attr
I also have a list of this object and I am loading this List<ModelB>
with the data like this:
ModelB.Text = "Car";
ModelB.Value = "345.23";
ModelB.Text = "Car";
ModelB.Value = "343.23";
ModelB.Text = "Car";
ModelB.Value = "323.23";
ModelB.Text = "Toy";
ModelB.Value = "45.23";
ModelB.Text = "Toy";
ModelB.Value = "45.22";
ModelB.Text = "Toy";
ModelB.Value = "45.43";
What I want to do is to find the maximum an minimum valued cars, toys, etc. and check them like ModelB.Attr = "max";
or ModelB.Attr = "min";
So we have to mark the max an min of the each type of object. And yes all the data is string
unfortunately and I am parsing it to decimal usually.