public SizableImages(List<int> counts) { for (int i = 0; i < counts.Count(); i++) { tweetsTotalCount = counts.Sum(); SizableImage simage = new SizableImage(); simage.id = i; simage.size = 1 + (int)(MAX_SIZE * (double)counts[i] / tweetsTotalCount); simage.positionX = 0; simage.positionY = 0; images.Add(simage); } images.Sort((x, y) => (-x.size).CompareTo(-y.size)); }