C# - TPL2141 logo C# - TPL2141

Selection statements are used for transferring the program control to a specific flow based on the result of some conditional expressions (which return either true or false) (Docs, 2015).

In C# exists mainly 2 types of selection statement:

  1. if statements (two-way selectors)
  2. switch statements (multiple-way selectors)

References

  1. Docs, M. (2015, July 20). Selection Statements (C# Reference). Retrieved from https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/selection-statements