Convert dictionary to list collection in C#

前端 未结 6 1357
余生分开走
余生分开走 2021-01-30 09:54

I have a problem when trying to convert a dictionary to list.

Example if I have a dictionary with template string as key and string as value. Then I wish to convert the

6条回答
  •  清酒与你
    2021-01-30 10:32

    If you want to use Linq then you can use the following snippet:

    var listNumber = dicNumber.Keys.ToList();
    

提交回复
热议问题