VB.Net

VB.Net Decision Making

VB.Net Decision Making

In decision-making structures, the programmer must define one or more conditions to be evaluated or tested by the program. And a statement or statements to be executed if the condition is determined to be true, and optionally, further statements to be executed if the condition is determined to be false.

The general form of a typical decision-making framework present in most programming languages is shown below.


Decision making statements in VB.Net


Given below are the decision-making statements available in VB.Net: 

Statement

Description

If ... Then statement

“An If...Then statement consists of a boolean expression followed by one or more statements”.

If...Then...Else statement

An If...Then statement is followed by an optional Else statement, which gets executed when the Boolean expression is false.

nested If statements

If or Else if statement can be used inside another If or Else if statement(s).

Select Case statement

A ‘Select Case' statement is used to test a variable for equality against a list of values.

nested Select Case statements

One select case statement can be used inside another select case statement(s).

Top course recommendations for you

    Arduino vs Raspberry Pi
    2 hrs
    Beginner
    5.5K+ Learners
    4.56  (291)
    DevOps Landscape
    2 hrs
    Beginner
    2.2K+ Learners
    4.51  (71)
    Joins in SQL
    2 hrs
    Beginner
    8K+ Learners
    4.47  (281)
    Introduction to Firewall
    1 hrs
    Beginner
    20.6K+ Learners
    4.55  (1072)
    Design Thinking for Beginners
    1 hrs
    Beginner
    11.8K+ Learners
    4.41  (781)
    Database Management System
    1 hrs
    Beginner
    29.5K+ Learners
    4.44  (2037)
    Operational Excellence and Critical Thinking
    1 hrs
    Beginner
    5.6K+ Learners
    4.49  (263)
    .NET Fundamentals
    2 hrs
    Beginner
    19.5K+ Learners
    4.46  (1006)
    .NET OOPS
    1 hrs
    Beginner
    5.2K+ Learners
    4.55  (223)
    Python Practice Codes
    1 hrs
    Beginner
    6.7K+ Learners
    4.32  (215)