using System.Collections.Generic;
static List<ContentModel> contentOptions = new List<ContentModel>
public static void Main(string[] args)
List<string> selectedGreetings = new List<string>();
.Select(x => new { Count = x.Count(), Content = x.Key })
.ForEach(x => Console.WriteLine("{0} : {1}", x.Content, x.Count));
static IEnumerable<string> GetNextGreeting()
Random generator = new Random();
int totalWeight = contentOptions.Sum(x => x.Weight);
int selection = generator.Next(0, totalWeight);
foreach (ContentModel model in contentOptions)
if (selection - model.Weight > 0)
selection -= model.Weight;
yield return model.Content;
public string Content { get; set; }
public int Weight { get; set; }