tester typer i c#

This commit is contained in:
Geir Okkenhaug Jerstad 2024-11-29 13:50:58 +01:00
parent 9e1cff95ed
commit 766a121d87

View file

@ -96,29 +96,15 @@
\_________________\___\/ \_________________\___\/
End End
"""); """);
string mamaSaid = // Multi-line raw string literal.
""" long longNumber = 50918309109;
Mama said, "Life was just a box of chocolates..." int intNumber = (int)longNumber;
"""; long n = long.MaxValue;
string jsonDialogue = $$""" int i = int.MaxValue;
{ Console.WriteLine($"\n{longNumber.ToString()}, {intNumber.ToString()}, {n.ToString()}, {i.ToString()}");
"quote": { Console.WriteLine("\nPress any key to continue...");
"character": "The MAN", Console.ReadKey();
"dialogue": ""
},
"description": "She nods, not much interested. He...",
"quote": {
"character": "The MAN",
"dialogue": ""
},
"description": "She shakes \"no\" He unwraps it...",
"quote": {
"character": "The MAN",
"dialogue": "{{mamaSaid.Replace("\"", "\\\"")}}"
}
}
""";
Console.WriteLine(jsonDialogue);
} }
} }
} }