vbselect - CIS 338: VB.NET – Selection Dr. Ralph D....

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 338: VB.NET – Selection Dr. Ralph D. Westfall January, 2009
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Selection Visual Basic.NET has two types of control structures for changing what code gets executed in a procedure If and its variations Case calling a subprocedure or a function is also a way to change the flow of instructions
Background image of page 2
Java vs. Visual Basic.NET If if(a==b){ //code line(s); } else{ //code line(s); } If a = b Then 'code line(s) Else 'code line(s) End IF
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Selection/Branching - If always based on a condition (test) condition should evaluate to True or False A = B A > B AND C < D True if Option Strict is Off, 0 is False one-line If statement If [condition] Then [code] 'don't forget the Then 'code only runs if True
Background image of page 4
Selection/Branching - If 2 “block” If statement If [condition] Then [line(s) that run when True] End If 'not EndIf (must put space 'between End and If)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Selection/Branching - If 3 If [condition] Then [code that runs if True] Else [code that runs if False] End If
Background image of page 6
Selection/Branching - If 4 If [condition 1] Then
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/13/2009 for the course CIS 338 taught by Professor Westfall during the Winter '09 term at Cal Poly Pomona.

Page1 / 15

vbselect - CIS 338: VB.NET – Selection Dr. Ralph D....

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online