Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Завдання з рядками | Робота з типами даних
Основи C#

book
Завдання з рядками

Використовуйте конкатенацію рядків, щоб об'єднати та вивести три рядки strA, strB та strC:

cs

main

copy
using System;

namespace ConsoleApp
{
internal class Program
{
static void Main(string[] args)
{
string strA = "The ";
string strB = "sentence is ";
string strC = "complete.";

// Write code below this line
Console.WriteLine(___);
// Write code above this line
}
}
}
123456789101112131415161718
using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { string strA = "The "; string strB = "sentence is "; string strC = "complete."; // Write code below this line Console.WriteLine(___); // Write code above this line } } }
  1. Конкатенація рядків — це процес об'єднання двох рядків за допомогою оператора +.
cs

main

copy
using System;

namespace ConsoleApp
{
internal class Program
{
static void Main(string[] args)
{
string strA = "The ";
string strB = "sentence is ";
string strC = "complete.";

// Write code below this line
Console.WriteLine(strA + strB + strC);
// Write code above this line
}
}
}
123456789101112131415161718
using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { string strA = "The "; string strB = "sentence is "; string strC = "complete."; // Write code below this line Console.WriteLine(strA + strB + strC); // Write code above this line } } }
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 7
some-alt