vb .net help

r3mix

New member
Joined
Apr 6, 2006
Messages
1
Programming Experience
Beginner
I recently have to take a college vb.net test and i cannot figure a few problems out...if you could in anyway shape or form help me u would be saving my grade...so please anyone with knowledge on my subject post what you can

Thanks~

1. In vb.net of the 3 forms of IF statement, which one doesnt require an END IF

2. Write a statement that will generate random #'s from the set 2,3,4,5,6,7

3. What is the Value of NumVar when following code is executed?

Dim Numvar as integer
NumVar=inStr("Now is time for all good men","time for")

4. Which is true?
"Cat" = "cat"
"Cat" < "cat"
"Cat" > "cat"
Relational operators are only valid with # values

5. Write the code: Write a statement that will print desired text in a ListBox lstDisplay depandant on the user's input for intChoice. The choices are 1 or 2,"Buckle my shoe." 3 or 4,"Shut the Door." 5 or 6,"Pick up sticks." 7 or 8,"Close the gate."

Catch is you must use differnet methods in each case tested. IntChoice has a valid value.

6. Write the code: Write the code for Input Box that will represent and accept a value for IntChoice above and then test it for a valid value...If invalid, worn the user then force them to repeat input

Hint: need MsgboxStyle.OkOnly



~ thanks for any help that you may wish to post ~
 

vis781

Well-known member
Joined
Aug 30, 2005
Messages
2,015
Location
Cambridge, UK
Programming Experience
5-10
Hi, We can't do your homework for you, but believe me when i say that those questions may appear daunting but with a bit of research you'll find the answers. That said i'll give you a type of 'IF' statement that doesn't need an 'End If'

VB.NET:
If 1=1 then textbox1.text = "No 'End IF' Statement"
 

ImDaFrEaK

Well-known member
Joined
Jan 7, 2006
Messages
416
Location
California
Programming Experience
5-10
You should probably retake the class. This is pretty basic stuff that you should be able to find on your own in your textbook. Sorry.
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
welcome to the forums

as the previous two posts have told ya that we cant do homework for you, but if you ask a homework question and post the code that you've come up with so far, we can help you fix your code from there

also as it's been pointed out already, these question's answers are easily found in just about any intro to vb.net book
 
Top Bottom