Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Strängar Utmaning | Hantera Datatyper
C#-Grunder

bookSträngar Utmaning

Använd strängkonkatenering för att sammanfoga och skriva ut de tre strängarna strA, strB och strC:

main.cs

main.cs

copy
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 } } }

Strängkonkatenering är processen att sammanfoga två strängar med hjälp av operatorn +.

main.cs

main.cs

copy
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 } } }

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 7

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

Suggested prompts:

Can you show me an example of string concatenation with these variables?

What will the output look like after concatenation?

Can I use other methods to join strings besides the + operator?

Awesome!

Completion rate improved to 1.59

bookSträngar Utmaning

Svep för att visa menyn

Använd strängkonkatenering för att sammanfoga och skriva ut de tre strängarna strA, strB och strC:

main.cs

main.cs

copy
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 } } }

Strängkonkatenering är processen att sammanfoga två strängar med hjälp av operatorn +.

main.cs

main.cs

copy
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 } } }

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 7
some-alt