Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
String | Dealing with Data Types
course content

Зміст курсу

C# Basics

StringString

A string is a sequence of characters. Strings are used for storing textual data.

cs

main.cs

String data (text) is always enclosed in double quotation marks (").

We of course cannot perform arithmetic operations on strings however we can use the plus (+) operator to join two strings. The process of joining strings using the plus operator is called string concatenation.

cs

main.cs

We can use the new line character (\n) to represent a new line in string data.

For-example:

cs

main.cs

When the \n character is encountered, the text automatically shifts to a new line. We can use multiple newline characters to skip multiple lines:

cs

main.cs

What will be the output of the following code?

Виберіть правильну відповідь

Все було зрозуміло?

Секція 2. Розділ 6
course content

Зміст курсу

C# Basics

StringString

A string is a sequence of characters. Strings are used for storing textual data.

cs

main.cs

String data (text) is always enclosed in double quotation marks (").

We of course cannot perform arithmetic operations on strings however we can use the plus (+) operator to join two strings. The process of joining strings using the plus operator is called string concatenation.

cs

main.cs

We can use the new line character (\n) to represent a new line in string data.

For-example:

cs

main.cs

When the \n character is encountered, the text automatically shifts to a new line. We can use multiple newline characters to skip multiple lines:

cs

main.cs

What will be the output of the following code?

Виберіть правильну відповідь

Все було зрозуміло?

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