How to get minimum value?

ArrayList arrKey = new ArrayList();
                    double v;
                    double min;
 foreach (string subKey in sortList4.Keys)
                    {                                              
                        foreach(string mee in arrKey)
                        {                           
                            sortList5.Add(mee,1);
                            if(sortList3.ContainsKey(mee))
                            {
                              sortList3.TryGetValue(mee, out v);                              
                                if(v>min)
                                {
                                   //what should do at here?
                                }
                            }}}

Recommended Answers

All 2 Replies

You didnt even set the min value until here. It is still 0 (or not even that, because you didnt initialize it). So you cannot compare it (if(v > min)!

I solved it, thx anyway

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.