using System.Collections.Generic;
public static void Main()
var sentence = "This is going to be a really really really really really long text.";
const int maxLenght = 20;
if (sentence.Length < maxLenght)
Console.WriteLine(sentence);
string[] words = sentence.Split(' ');
var summaryWords = new List<string>();
foreach (var word in words)
totalChar = totalChar + word.Length +1 ;
if (totalChar > maxLenght)
var summary = String.Join(" ", summaryWords) + "....";
Console.WriteLine(summary);