简体   繁体   中英

Best way to convert dictionary information into formatted strings (C#)

I have a dictionary of words and the number of times they appear(String,int).

I need to then take this information and display it to a GUI after catorgorizing the words alphabetically or by frequency.The categorizes will be displayed and start with

"Words Starting with the letter _"

or wtih

"Words that occur _ times"

and then display the correct information. However the words display must also be formatted into a varying number of columns (1-6) that the user can change.

Mainly I am looking for any suggestions on how to categorize the information and the formatting.

*Also, I must use a dictionary that is sorted by linq which I already have

What you're calling categorization is referred to as "grouping" in LINQ. Check out the Grouping samples .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM