Time for action – creating the word histogram
Follow the given steps:
- Create a console application. Call it
TagCloud
. - Add the following in the
Main()
method ofProgram.cs
:Dictionary<string, int> wordHistogram = new Dictionary<string, int>(); wordHistogram.Add("Apple",33); wordHistogram.Add("Orange",85); wordHistogram.Add("Strawberry",20); wordHistogram.Add("Watermelon",150); wordHistogram.Add("Guava", 52); wordHistogram.Add("Grape", 80); ShowCloud(wordHistogram);
- Copy the
Sample Code
from the following location and save it asTagCloudData.txt
in the in theC:\
drive:http://visapi-gadgets.googlecode.com/svn/trunk/termcloud/doc.html
- Replace the highlighted part of this file (as shown in the following screenshot) with a place holder
!DATA!
:Delete ...
Get .NET 4.0 Generics now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.