Making decisions is one of the most executed tasks when writing business logic. In Visual Basic .NET you use in most cases an If .. Then .. Else statement or a Select Case statement. In C# there is no big difference, beside the fact that the naming of the keywords is a bit deviant. Let’s start with a simple If .. Then ... Else statement.
Tuples are primitive types where you can easily combine multiple values to one variable. They are as a datatype not completely new for C# 7.0 or Visual Basic 15, but the way you can use them is, with the new System.ValueTuple type, much improved. In this post I will show you how you can take advantage of the streamed syntax of value tuples. The old System.Tuple became not very populair, mainly because the results where not strongly named; you have to use them like result.Item1, result.Item2 etc.