dotnet-core/samples/dotnetsay/Program.cs
Rich Lander cbda8e6974
Update samples for C# 9 (#5579)
* Update projects to .NET 5.0

* Update to top-level projects

* Add typing
2020-11-11 18:57:08 -08:00

59 lines
2 KiB
C#

using System;
string message = "Welcome to dotnetsay, a .NET tool!";
if (Console.IsInputRedirected)
{
message = Console.In.ReadToEnd();
}
else if (args.Length > 0)
{
message = string.Join(" ", args);
}
Console.WriteLine(GetBot());
string GetBot()
{
return @$"
{message}
__________________
\
\
....
....'
....
..........
.............'..'..
................'..'.....
.......'..........'..'..'....
........'..........'..'..'.....
.'....'..'..........'..'.......'.
.'..................'... ......
. ......'......... .....
. ......
.. . .. ......
.... . .......
...... ....... ............
................ ......................
........................'................
......................'..'...... .......
.........................'..'..... .......
........ ..'.............'..'.... ..........
..'..'... ...............'....... ..........
...'...... ...... .......... ...... .......
........... ....... ........ ......
....... '...'.'. '.'.'.' ....
....... .....'.. ..'.....
.. .......... ..'........
............ ..............
............. '..............
...........'.. .'.'............
............... .'.'.............
.............'.. ..'..'...........
............... .'..............
......... ..............
.....
";
}