Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Streng-Udfordring | Håndtering af Datatyper
C# Grundlæggende

bookStreng-Udfordring

Brug strengsammenkædning til at sammenføje og udskrive de tre strenge strA, strB og 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 } } }

Strengsammenkædning er processen, hvor to strenge sammenføjes ved hjælp af +-operatoren.

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 alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 7

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

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

bookStreng-Udfordring

Stryg for at vise menuen

Brug strengsammenkædning til at sammenføje og udskrive de tre strenge strA, strB og 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 } } }

Strengsammenkædning er processen, hvor to strenge sammenføjes ved hjælp af +-operatoren.

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 alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 7
some-alt