✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
public static void Main()
{
_______________
string nameOld = "Петро Ілліч Чайковський";
Console.WriteLine ( "Після спроби видалити батькові: {0}",
RemoveName2 (nameOld, out nameNew)? nameNew: nameOld);
}
static bool RemoveName2 (string s1, out string s2)
{
int found1 = s1.IndexOf ( "");
int found2 = s1.IndexOf ( "", found1 + 1);
if (found1> 0 && found2> 0)
{
s2 = s1.Remove (found1 + 1, found2 - found1); return true;
}
s2 = ""; return false;
}
Серед наведених кодів вкажіть всі коди, підстановка кожного з яких замість знаків підкреслення призведе до коректної програмі, що виводить на консоль рядок Петро Чайковський
(**CharpBase**)