Example #1
0
        public string DelWord(int index)
        {
            string[] words    = Text1.Split(' ');
            string[] result   = new string [words.Length - 1];
            string   newText1 = " ";

            for (int i = 0; i < words.Length; i++)
            {
                if (i < index)
                {
                    result[i] = words[i];
                }
                else if (i > index)
                {
                    result[i - 1] = words[i];
                }
            }
            for (int i = 0; i < words.Length - 1; i++)
            {
                newText1 += result[i] + " ";
            }
            return(newText1);
        }