A
Q. In the following Visual Basic code, what will be in msg, if str contains "visual basic"?
Dim str as String Dim msg as String If str.toUpper="VISUAL BASIC" msg="VB.Net" Else msg="Not Visual Basic" EndIf
The given Visual Basic code snippet compares the string variable str with "VISUAL BASIC" after converting it to uppercase using the ToUpper method. If the str variable contains "visual basic", it will be converted to "VISUAL BASIC" and compared with "VISUAL BASIC". Since the comparison is case insensitive due to the use of ToUpper, the condition will be true and msg will be assigned the value "VB.Net". Hence, the output will be "VB.Net".
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. The . . . . . . . . in a pattern represents a single digit.
Q. A control's KeyPress event occurs every time . . . . . . . .
Q. String comparison in Visual basic is case-sensitive.
Q. What value is stored in the intCount variable when the loop ends?
Q. A . . . . . . . . variable is the instance of the String class.
Q. The variable that does not change the value during execution of program is. . . . . . . .
Q. Use the . . . . . . . . to verify the tab order control in the interface.
Discusssion
Login to discuss.