Tuesday, December 15, 2015

VB.NET test answers of 2016

In this post you can find Complete and recently updated Correct Question and answers of VB.NET. All Answers updated regularly with new questions. Upwork VB.NET test answers of 2016.



Question:* What is a button's default event type?

Answer: • Click

Question:* Which term is not related to multithreading issues?

Answer: • Enumerable

Question:* When you open a loop with a For statement, you can close the loop with a ___________ statement.

Answer: • Next

Question:* The lowest bound value of arrays in VB.NET is ___ ?

Answer: • 0

Question:* What design window allows you to add controls to a form?

Answer: • toolbox window

Question:* Which class has a .Fill method which is used to add or refresh rows in a dataset?

Answer: • DataAdapter

Question:* What type of Visual Basic project creates a standard Windows program?

Answer: • the Windows Forms Application

Question:* A collection of DataRows is called a ________.

Answer: • DataSet

Question:* What does LINQ stand for?

Answer: • Language-Integrated Query

Question:* What specific time value is attributed to the Interval property in the TImer control?

Answer: • milliseconds

Question:* What is the correct way of ending a VB.NET Sub?

Answer: • End Sub

Question:* What toolbar allows you to control alignment and spacing?

Answer: • layout toolbar

Question:* You use _________ to declare a procedure that returns a value.

Answer: • Function

Question:* What character donates a section of commented code?

Answer: • ' apostrophe

Question:* A variable declared as: Dim Var as Integer = 5, after executing the next line of: Var -= 1, would have what value?

Answer: • 4

Question:* Which operation is performed first in the following example? y = 17 + 7 / 2

Answer: • the division operation of 7 / 2

Question:* The serialization of an Object means that it is written out to a stream

Answer: • True

Question:* A 'for' loop will run faster in VB.NET or C# ?

Answer: • Both of them will run equally fast.

Question:* True or False? A WPF control can be embedded inside of a Winforms application.

Answer: • True

Question:* Which method of the SQLCommand class would you use to call a stored procedure which does not return any data?

Answer: • ExecuteNonQuery

Question:* True or False? An interface can inherit from another interface.

Answer: • True

Question:* What technology allows you to issue SQL-like commands against a collection of objects in VB.Net?

Answer: • LINQ

Question:* What object would you use to manipulate a folder?

Answer: • System.IO.Directory

Question:* To make a hidden form appear, you set what property?

Answer: • Visible property to True

Question:* Can a Try-Catch-Finally block be nested inside of the Finally section of another Try-Catch-Finally block?

Answer: • Yes

Question:* In system.streamwriter, what method is used to clear all buffers and causes any buffered data to be written to the underlying stream?

Answer: • Flush

Question:* ____________ is when objects contain their respective data and code.

Answer: • Encapsulation

Question:* What is the base class of all other .Net classes?

Answer: • system.object

Question:* In order to determine whether a dataset has pending modifications to it's data, you would call which method?

Answer: • Dataset.HasChanges

Question:* What keyword should be used when declaring a variable inside a method, whose value should remain the same between calls?

Answer: • Static

Question:* A property of an object can be another object.

Answer: • True

Question:* Protected methods of a class are accessible from their own class and from:

Answer: • Derived classes

Question:* To have your code executed when an if....then statement evaluates to False, you use a ____________ clause.

Answer: • Else

Question:* Terminate a For/Next loop with the _______ statement.

Answer: • exit For

Question:* A class declared as: Public Class Sample(of T), is an example of what type of class?

Answer: • Generic

Question:* True or False? The Finally portion of a Try-Catch-Finally block only executes when an error occurs.

Answer: • False

Question:* How many elements are there in the following array? Dim X(3) as Integer

Answer: • 4

Question:* What character precedes a hotkey or accelerator that you are creating?

Answer: • & (ampersand)

Question:* When declaring two methods with the same names but different parameter types, you should use which keyword?

Answer: • Overloads

Question:* In order to draw to a surface, use the ______________.

Answer: • Graphics object

Question:* In order to copy the schemas, relationships and constraints of a dataset but not any data you would utilize which method?

Answer: • Dataset.Clone

Question:* True or False? A class have both a shared and non-shared constructor.

Answer: • True

Question:* The import required for the registry editing is

Answer: • Microsoft.Win32

Question:* How do you limit implicit type conversion in VB.NET?

Answer: • Option Strict On

Question:* How do you create a Read only Property in VB.NET

Answer: • Using Only Get..EndGet with in property definition

Question:* BCL stands for?

Answer: • Base Class Libraries

Question:* Which of the method is used to display the form as modal?

Answer: • ShowDialog( )

Question:* In the declaration: Dim varA As Object, VarB, VarC As Integer, what type is VarB?

Answer: • Integer

Question:* What is the purpose of Invoke Method?

Answer: • Used to call the procedure through Delegate variable

Question:* To determine which button is being pressed during a mouse-related event, use the _________ property in that particular event.

Answer: • e.button

Question:* Which statement helps prevent multiple threads from accessing the same codeblock at the same time?

Answer: • SyncLock

Question:* COMException class can be found in

Answer: • System.Runtime.Interopservices

Question:* A class declared as friend is accessible from:

Answer: • Anywhere in the same assembly

Question:* When you assign a value type to a reference type, data is copied from the stack to the heap. What is this called?

Answer: • Boxing

Question:* Which of the following is not a method of the Textbox class?

Answer: • Flush()

Question:* You are using the SQLTransaction class for a series of SQL statements. Where do you attach the SQLTransaction by using BeginTransaction?

Answer: • Attach to the SQLClient.SQLConnection

Question:* True or False? A class cannot implement an interface while also inheriting from a base class.

Answer: • False

Question:* Which of the following is the most valid example of the My object in Visual Basic?

Answer: • Me.Text = My.Computer.FileSystem.SpecialDirectories.MyDocuments

Question:* True or False? By default, parameters are passed ByRef.

Answer: • False

Question:* Can an Enum be declared and exposed from within an Interface?

Answer: • Yes

Question:* Which control would you employ to present a yes/no value to an end user?

Answer: • a check box

Question:* The correct syntax for the event that is fired when the mouse pointer rests on a TextBox control is

Answer: • OnMouseHover

Question:* To hold a money value, you would use the Object data type.

Answer: • False

Question:* What method of the Thread class would you call to force multiple threads to complete before moving on to the next section of code?

Answer: • Join

Question:* Do reference types or value types have their value stored on the stack?

Answer: • Value

Question:* Which is not a binding associated with WCF services?

Answer: • DiskSynchronousTransferBinding

Question:* Which keyword refers the parent of the current object

Answer: • Mybase

Question:* What is the difference between Or and OrElse?

Answer: • Or does not short-circuit, while OrElse does

Question:* Which of the following is a valid declaration for a nullable integer type?

Answer: • Dim num As Nullable(of Integer)

Question:* If no access modifier is specified for a class, it is considered _______?

Answer: • Public

Question:* The following variable: Dim product = New With {Key .Name = "paperclips", .Price = 1.29}, is referred to as:

Answer: • An Anonymous Type

Question:* How many times can a class inherit from different parent classes?

Answer: • 1

Question:* What is the value of b after this code is executed? Dim b As Boolean = Nothing

Answer: • False

Question:* Extension methods may only be declared inside of:

Answer: • Modules

Question:* In order to allow multiple WCF services to listen on the same port, you must set which property of the binding class to true?

Answer: • PortSharingEnabled

Question:* Assuming s is a String and i is an Integer, what data type does the following method call return: Int32.TryParse(s, i)

Answer: • Boolean

Question:* When both a parent class and a derived class have both a shared and an instance CTOR, in what order do they fire when creating an instance of the derived class like this: Dim MyObject as New DerivedClass?

Answer: • Derived Shared, Parent Shared, Parent Instance, Derived Instance

Question:* True or False? Tuples are value types as opposed to reference types.

Answer: • False

Question:* In order to allow assembly (a) to see methods declared as friend in assembly (b), what attribute can you use?

Answer: • InternalsVisibleTo

Question:* What is the value of DateTime.MinValue.Year?

Answer: • 1

Question:* True or False? A public method declared inside of a public module is accessible from another assembly.

Answer: • False

Question:* True or False? The following array declaration is valid: Dim X(-1) As Integer.

Answer: • True



No comments:

HTML5 Upwork (oDesk) TEST ANSWERS 2022

HTML5 Upwork (oDesk) TEST ANSWERS 2022 Question: Which of the following is the best method to detect HTML5 Canvas support in web br...

Disqus for upwork test answers