private void FeeDText(MarkovChain model) { StringBuilder Feeder = new StringBuilder(); string line; using (StreamReader reader = new StreamReader(Server.MapPath(Url.Content("~/Content/TextFiles/BenFranklin.txt")))) { while ((line = reader.ReadLine()) != null) { var l = line.Trim(); if (l.Length > 3) { Feeder.AppendLine(l); } else if (Feeder.Length > 0) { model.AddString(Feeder.ToString()); Feeder.Length = 0; } } if (Feeder.Length > 0) { model.AddString(Feeder.ToString()); } } }