diff --git a/16_Bug/csharp/Game.cs b/16_Bug/csharp/Game.cs index b82c270d..f1bc1291 100644 --- a/16_Bug/csharp/Game.cs +++ b/16_Bug/csharp/Game.cs @@ -15,11 +15,11 @@ internal class Game public void Play() { - _io.WriteLine(Resource.Streams.Introduction); + _io.Write(Resource.Streams.Introduction); var response = _io.ReadString("Do you want instructions"); if (!response.Equals("no", StringComparison.InvariantCultureIgnoreCase)) { - _io.WriteLine(Resource.Streams.Instructions); + _io.Write(Resource.Streams.Instructions); } } } \ No newline at end of file diff --git a/16_Bug/csharp/Resources/Intructions.txt b/16_Bug/csharp/Resources/Instructions.txt similarity index 100% rename from 16_Bug/csharp/Resources/Intructions.txt rename to 16_Bug/csharp/Resources/Instructions.txt diff --git a/16_Bug/csharp/Resources/Introduction.txt b/16_Bug/csharp/Resources/Introduction.txt index b49238e6..e74a833e 100644 --- a/16_Bug/csharp/Resources/Introduction.txt +++ b/16_Bug/csharp/Resources/Introduction.txt @@ -5,3 +5,4 @@ The Game Bug I hope you enjoy this game. + diff --git a/16_Bug/csharp/Resources/Resource.cs b/16_Bug/csharp/Resources/Resource.cs index 165b9c82..51b7bf39 100644 --- a/16_Bug/csharp/Resources/Resource.cs +++ b/16_Bug/csharp/Resources/Resource.cs @@ -19,6 +19,7 @@ internal static class Resource } private static Stream GetStream([CallerMemberName] string? name = null) => - Assembly.GetExecutingAssembly().GetManifestResourceStream($"Basketball.Resources.{name}.txt") + Assembly.GetExecutingAssembly() + .GetManifestResourceStream($"{typeof(Resource).Namespace}.{name}.txt") ?? throw new Exception($"Could not find embedded resource stream '{name}'."); } \ No newline at end of file