minor tweaks for IGame.WriteToConsole()
Posted: Wed Mar 25, 2020 7:41 am
Remove IGame.WriteToConsole(string message)
I think the new overloading IGame.WriteToConsole(params object[] messages) can cover the old one use cases. I'd like to remove the old one because it conflicts with the new one when printing null value
WriteToConsole(null) should print the string "null"
Right now it prints an empty string which may be a little bit confusing. It'd be more clear if you can make it returns the word "null" instead
I think the new overloading IGame.WriteToConsole(params object[] messages) can cover the old one use cases. I'd like to remove the old one because it conflicts with the new one when printing null value
Code: Select all
Game.WriteToConsole(null); // CS0121 The call is ambiguous between the following methods...
Game.WriteToConsole(null, null); // compliled successfully
Right now it prints an empty string which may be a little bit confusing. It'd be more clear if you can make it returns the word "null" instead