answersLogoWhite

0

it compares one variable with a lot of 'cases' and if it matches a certain case it does something. (you can use multiple if statements instead, but it is more simple this way)

Here is a small example:

Dim i As Integer = Console.ReadLine()

Select Case i

Case Is < 100

Console.WriteLine("The number is less than 100.")

Case 100

Console.WriteLine("The number is exactly 100.")

Case Else

Console.WriteLine("The number is greater than 100.")

End Select

Console.ReadLine()

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What is the section of a select case statement that is branched to if none of the case values match the expression listed after the select statement?

The default case.


What is a select case statement used for in programming?

In programming, select case statement is a way to test the inside of a variable. It is used when one knows there is a limited number of things that can be in the variable.


What is Difference between if statement and select case statement in vb.net?

They are both conditional logic statements. The Select Case statement just happens to have a much more clean form when it comes to more than two cases.Example of If..Then...Else:If intVar = 123 ThenmyStr = "123"ElsemyStr = "456"End IfExample of Select Case:Select Case intVarCase 123myStr = "123"Case 456myStr = "456"Case ElsemyStr = "789"End Select


What is Difference between if statement and select case statement in vbscript?

If statements and Select-Case statements are two similar features that allow for code branching. The difference is that each If statement may compare against different variables and different ranges, while Select-Case statements may only compare against one variable at a time, and must compare against discrete values. Select-Case is therefore a specialized form of If statements, and are more efficient in terms of amount of code used and execution speed when used instead of theequivalentIf-Else statements.


How do you do a select statement within a select statement in sql?

A memo is a useful tool to provide a record of communication.


How can you check vowel or consonent in vbnet?

You can check if a character is a vowel or a consonant in VB.NET by using a conditional statement with the Char.ToLower() method to ensure case insensitivity. You can then check if the character is a vowel by comparing it to a list of vowels using the Contains() method, and if it is not a vowel, it is considered a consonant.


Select the FALSE statement from below?

A


What is the difference between If-else and Switch-case in Java?

The if statement is used to select among two alternatives. It uses a boolean expression todecide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternativeshould be executed.


What is the difference between a statement and a clause in SQL?

An SQL statement is a complete set of clauses which returns a value and ends with a semicolon(;) A statement is made up of several clauses Ex: select * from person where f_name='me'; In this ex ' select * from person where f_name='me';' is the statement and select*, from person, where f_name= are the clauses


What clause of the select statement names the table that contains the data to be retrieved?

The FROM clause names the table that contains the data to be retrieved in a SELECT statement.


What is difference between select Case statement and nested loop in c programming in UNIX?

UNIX has no bearing on the C language; it is cross-platform. There is no select/case in C, you probably meant switch/case. However, a switch/case is a conditional jump while a nested loop is a loop within a loop. Besides the C language they have nothing in common with each other.


Specific case in which a statement is false?

A counterexample is a specific case in which a statement is false.