forked from dotnet/tutorial-codespace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello-world.cs
More file actions
34 lines (29 loc) · 1.27 KB
/
Copy pathhello-world.cs
File metadata and controls
34 lines (29 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
string ühüman = "Ümann";
string obst = "Apfel";
//Console.WriteLine("Challü World!");
ühüman = "Gelühbtester Ümann";
//Console.WriteLine("Wen lühbe ich am meisten?:" + ühüman);
// Console.WriteLine($"Meinen {ühüman} lühbe ich am meisten!");
//Console.WriteLine($"Das Obst {obst} hat {obst.Length} Buchstaben.");
string greeting = " Hello World! ";
string trimmedGreeting = greeting.Trim();
//Console.WriteLine($"[{trimmedGreeting}]");
string sayHello = "Moin Ümannü";
Console.WriteLine(sayHello);
sayHello = sayHello.Replace("Moin", "Challü");
Console.WriteLine(sayHello);
Console.WriteLine(sayHello.ToUpper());
Console.WriteLine(sayHello.ToLower());
string songLyrics = "You say goodbye, and I say helloo";
Console.WriteLine(songLyrics.EndsWith("hello") || songLyrics.StartsWith("You"));
Console.WriteLine(songLyrics.Contains("greetings"));
}
}
}
// https://learn.microsoft.com/de-de/dotnet/csharp/tour-of-csharp/tutorials/hello-world