Control Structure
Let us SEE control structure in VB.NET Consider you go to fruit shop and ask for whether the shop sell apple or not just by asking the you get the answer similarly you are going to this in VB.NET. First let us see an example .
In the above example a string variable Asked is assigned
with “apple” . One important thing I forgot to mention in the previous blog
that string values are assigned with double quotes “ ” all other variables like
Integer , Single (we have not seen yet ) are simple assign without quotes.
The statement
If Asked = "apple"
ThenChecks if Asked variable value is “apple” if it is statement in the if block is executed otherwise statement in the Else block is executed.
Syntax of If Else Control
Structure
If condition thenStatements
Else
Statements
End If
We will see Examples in
If Else Control Structure in the
upcoming blogs.
No comments:
Post a Comment