Entity integrity and domain integrity involve allowing valid values into our application for further processing. Valid values include manipulating or managing input provided by a user, rendering it as data that is acceptable to the application. This process may including parsing specific types of data to the type our application accepts, converting data types, and so on.
Parse and TryParse are two statements available across multiple data types within the .NET Framework, for example if you are writing a console application and you want to accept parameters as command-line arguments. In a console application, command-line parameters are always of the string type. So, how do you parse these arguments from the string type to another required type?
In the following example, we know that our first parameter is a Boolean value, but is passed as a string. When...