diff --git a/00_Common/dotnet/Games.Common.Sample/Program.cs b/00_Common/dotnet/Games.Common.Sample/Program.cs new file mode 100644 index 00000000..6bd2a8c4 --- /dev/null +++ b/00_Common/dotnet/Games.Common.Sample/Program.cs @@ -0,0 +1,7 @@ +using Games.Common.IO; + +var io = new ConsoleIO(); + +var name = io.ReadString("What's your name"); + +io.WriteLine($"Hello, {name}"); diff --git a/00_Common/dotnet/Games.Common/IO/ConsoleIO.cs b/00_Common/dotnet/Games.Common/IO/ConsoleIO.cs new file mode 100644 index 00000000..842eb01c --- /dev/null +++ b/00_Common/dotnet/Games.Common/IO/ConsoleIO.cs @@ -0,0 +1,16 @@ +using System; + +namespace Games.Common.IO +{ + /// + /// An implementation of with input begin read for STDIN and output being written to + /// STDOUT. + /// + public sealed class ConsoleIO : TextIO + { + public ConsoleIO() + : base(Console.In, Console.Out) + { + } + } +} \ No newline at end of file