Sharpen your VB.NET skills with 30 expertly crafted MCQs. Explore .NET Framework, learn to set up Visual Studio, navigate the IDE, and write your first VB.NET program!
Introduction to VB.NET MCQs
1. Overview of .NET Framework
Which of the following is a key feature of the .NET Framework? A. Platform independence B. Language interoperability C. File sharing D. Hardware virtualization
What does CLR stand for in the .NET Framework? A. Common Language Runtime B. Central Logic Routine C. Code Language Repository D. Common Logic Runtime
Which component of the .NET Framework manages memory allocation? A. Base Class Library B. Common Type System C. Common Language Runtime D. Garbage Collector
What is the primary role of the Base Class Library (BCL)? A. To manage memory B. To provide a runtime environment C. To offer reusable classes and methods D. To compile code
The .NET Framework supports: A. Only VB.NET B. Multiple programming languages C. Only C# D. Only web-based applications
2. Setting Up Visual Studio
Which edition of Visual Studio is free for individual developers? A. Professional B. Enterprise C. Community D. Ultimate
What is required to install Visual Studio? A. Windows OS only B. An IDE installer C. A .NET-compatible operating system D. A valid license key
Visual Studio installer allows: A. Selective component installation B. Only full installation C. No installation customization D. Auto-updates only
What is the primary purpose of Visual Studio? A. Writing web pages B. Managing databases C. Software development D. Hardware programming
Which of the following tools is integrated into Visual Studio? A. Task Scheduler B. Debugger C. File Explorer D. Memory Monitor
3. VB.NET IDE Walkthrough
In VB.NET IDE, the Solution Explorer: A. Displays code errors B. Manages solution files C. Tracks variable states D. Shows program output
What is the Toolbox in the VB.NET IDE used for? A. Debugging applications B. Adding controls to forms C. Viewing project properties D. Compiling the code
The Properties Window allows you to: A. Write program logic B. Set object attributes C. Track error logs D. Compile code
In VB.NET, the Output Window is used to: A. Edit the code B. Monitor build processes C. Add references D. Manage solutions
Which shortcut key is used to start debugging in VB.NET IDE? A. Ctrl + S B. F5 C. Shift + F10 D. Alt + D
4. Writing Your First VB.NET Program
Which extension is used for VB.NET source code files? A. .vbs B. .vb C. .vbn D. .vbe
What is the entry point of a VB.NET program? A. Main() function B. Sub Procedure C. Form1_Load D. Module1
How do you display a message box in VB.NET? A. Msg.Show() B. MessageBox.Display() C. MsgBox() D. Box.Message()
In VB.NET, which keyword is used to declare a variable? A. Var B. Dim C. Let D. Declare
What does the Console.WriteLine() method do? A. Reads user input B. Writes output to the console C. Displays a dialog box D. Executes an application
Which control is commonly used to capture user text input in VB.NET? A. Label B. TextBox C. Button D. ListBox
What is the correct syntax for a comment in VB.NET? A. // B. # C. ‘– D. ‘
To run a VB.NET program, you: A. Compile it into a .dll file B. Execute the .exe file C. Import it into the .NET CLI D. Save it in the Solution Explorer
What does Dim num As Integer do in VB.NET? A. Declares a variable without initialization B. Declares and initializes a variable C. Declares an array D. Declares a method
Which of the following is a valid VB.NET statement? A. Dim age As Integer = “25” B. Dim age As String = 25 C. Dim age As Integer = 25 D. Var age = 25
What is the purpose of the End statement in VB.NET? A. Exit a loop B. Close the IDE C. Terminate a program D. Restart the debugger
Which command compiles and runs the VB.NET program? A. Ctrl + R B. Start Debugging (F5) C. Execute from CMD D. Solution Build
What does the term “form” mean in VB.NET? A. A type of project B. The interface window of an application C. A compiled program D. A class in VB.NET
Which property sets the title of a form? A. Text B. Name C. Title D. Caption
To add a Button control to a form, you: A. Use the Toolbox B. Write code manually C. Drag it from the Menu bar D. Create it in the Solution Explorer