Поделить строковый массив на массив слов исключений - C#
Формулировка задачи:
Добрый день! Учебная задача.
Есть массив строк
Массив разделителей
Массив слов исключений
Задача, поделить строчный массив на массив слов исключений
string[] stringA = new string[3];
stringA[0] = "Hello My name is Benjamin Button";
stringA[1] = "I read the letter. Stood up. Sat down.";
stringA[2] = "One can become a writer only if he is talented.";char[] sep = {'.', ':', ' '}string[] words = { "is if he i my" };Решение задачи: «Поделить строковый массив на массив слов исключений»
textual
Листинг программы
using System;
class test
{
static void Main()
{
string[] words = { "is if he i my" };
char[] sep = { '.', ':', ' ' };
string[] words_mass = words[0].Split(new char[] { sep[2] });
}
}