Нет расстановки по убыванию

Подскажите пожалуйста , как решить проблему. Ввожу текст , жму F3 и программа завершается без расстановки. Задача такая: вводится текст , конец ввода F3, Расставить слова по убыванию количества букв.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace labaa2
{
    class Program
    {
        static void Main(string[] args)
        {
            string text = "";
            Console.WriteLine("vvod texta: ");
            EnterWhileNotF3(text);
            foreach (var word in text.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).OrderByDescending(x => x.Length))
            {
                Console.WriteLine(word);
            }
        }
        static void EnterWhileNotF3(string text)//ввод текста до F3
        {
            var input = Console.ReadKey();
            while (input.Key != ConsoleKey.F3)
            {
                text += input.KeyChar;
                input = Console.ReadKey();
            }
        }
    }
}

Ответы (1 шт):

Автор решения: Егор Белобородов
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace labaa2
{
    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder builder = new StringBuilder();
            Console.WriteLine("vvod texta: ");
            var text =  EnterWhileNotF3(builder);
            var slova = text.Split(' ');
            Sort(slova);
            Vivod(slova);
        }


        static void Vivod (string[] slova) 
        {
            Console.WriteLine();
            foreach (var word in slova)
            {
                Console.WriteLine(word);
            }
        }

        static void Sort(string[] slova) 
        {
            string temp = "";
            for (int i = 0; i < slova.Length - 1; i++)
            {
                for (int j = i + 1; j < slova.Length; j++)
                {
                    if (slova[i].Length < slova[j].Length)
                    {
                        temp = slova[i];
                        slova[i] = slova[j];
                        slova[j] = temp;
                    }
                }
            }
        }

        static string EnterWhileNotF3(StringBuilder text)

        {

            var input = Console.ReadKey();

            while (input.Key != ConsoleKey.F3)

            {

                text.Append(input.KeyChar);

                input = Console.ReadKey();

            }

            return text.ToString();

        }
    }
}
→ Ссылка