how to fetch data from nested Dictionary in c#

前端 未结 5 1065
一向
一向 2020-12-19 14:09

I need to fetch data from nested Dictionary IN C#. My Dictionary is like this:

static Dictionary&         


        
5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-19 14:44

    What about this, the method will enumerate through all dictionary items...

    public static IEnumerable> GetValues()
    {
        foreach (var pair in allOffset.Values)
        {
            foreach (var value in pair)
            {
                yield return value;
            }
        }
    }
    

提交回复
热议问题