Terminal methods to use
In Sequence and Data, we were able to use a number of methods from the .NET System libraries and SplashKit in order to produce outputs and read values from the user. Now that we have control flow, there are a number of additional methods that you can use to help with your projects.
Terminal Methods
In addition to WriteLine
, Write
, ReadLine
, and the convert methods we will now need ways to check if data provided has the right format. The .NET library doesn’t have the best
These methods will allow you to test if a string can be converted to an integer or a double. You can use these to perform simple validations, by using this as the condition in a loop. For example, the following validates the entry of a double value.