Do you know that? 46% of freelancers typically work for a client for one year or longer next

Contact Email: teammmrem@yahoo.com

<< All Upwork (oDesk) and Elance Tests << Elance test answers << IT & Programming category

Test answers for VB.NET 2016

(82, CL) Last updated: February 28
Elance • IT & Programming
Questions and answers are regularly updated. Answered and not answered tests questions.

This helps getting job: Hundreds of (cover letter examples , interview questions , profile samples ) • Earn on Upwork (oDesk)
Job assistance: jobs popularityfreelance rates

Popular test answers: HTML, .Net, CSS, English, SEO, Photoshop, iOS, Java, Android, Ruby, Python, JavaScript

See all 6 tests answers updated

Find Upwork (oDesk) and Elance test answers on this website:



Collapse | Expand

82 Answered Test Questions:

1. What is a button's default event type?

Answers:

• Click

• MultilineChanged

• Tick

• MouseMove

2. Which term is not related to multithreading issues?

Answers:

• Mutex

• ApartmentState

• Enumerable

• SpinLock

3. When you open a loop with a For statement, you can close the loop with a ___________ statement.

Answers:

• End While

• Next

• Do

• EndLoop

4. The lowest bound value of arrays in VB.NET is ___ ?

Answers:

• 1

• -1

• 0

• Infinite

5. What design window allows you to add controls to a form?

Answers:

• custom design window

• solutions explorer window

• properties window

• toolbox window

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

Answers:

• DataConnection

• SQLDependency

• DataAdapter

• SQLCommandBuilder

7. What type of Visual Basic project creates a standard Windows program?

Answers:

• Class Library Template

• Windows Presentation Foundation

• Console Application Template

• the Windows Forms Application

8. A collection of DataRows is called a ________.

Answers:

• Data.Set

• System.Data

• DataGroup

• DataSet

9. What does LINQ stand for?

Answers:

• Linear Query

• Lowest-Integrated Question

• Language-Integrated Query

• Light Interface Number Query

10. What specific time value is attributed to the Interval property in the TImer control?

Answers:

• milliseconds

• nanoseconds

• minutes

• seconds

11. What is the correct way of ending a VB.NET Sub?

Answers:

• End

• Kill

• Exit Sub

• Close Sub

• End Sub

12. What toolbar allows you to control alignment and spacing?

Answers:

• normal toolbar

• project toolbar

• base toolbar

• layout toolbar

13. You use _________ to declare a procedure that returns a value.

Answers:

• Function

• Call

• Sub

• MyProcedure

14. What character donates a section of commented code?

Answers:

• $ dollar sign

• { curly braces

• ' apostrophe

• / forward slash

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

Answers:

• -5

• 4

• 6

• 1

16. Which operation is performed first in the following example?  y = 17 + 7 / 2

Answers:

• the addition operation of 17 + 7

• the division operation of 7 / 2

17. The serialization of an Object means that it is written out to a stream

Answers:

• False

• True

18. A 'for' loop will run faster in VB.NET or C# ?

Answers:

• VB.NET

• None of these

• C#

• Both of them will run equally fast.

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

Answers:

• True

• False

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

Answers:

• ExecuteNonQuery

• ExecuteReader

• ExecuteScalar

• EndExecuteReader

21. True or False? An interface can inherit from another interface.

Answers:

• False

• True

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

Answers:

• WCF

• PLINK

• T-SQL

• LINQ

23. What object would you use to manipulate a folder?

Answers:

• System.IO.Directory

• CreateDirectory

• OpenFileDialog

• FileLen( )

24. To make a hidden form appear, you set what property?

Answers:

• Visible property to False

• ControlBox to True

• Visible property to True

• ControlBox to False

25. Can a Try-Catch-Finally block be nested inside of the Finally section of another Try-Catch-Finally block?

Answers:

• Yes

• No

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

Answers:

• Flush

• Clear

• Push

• Expel

27. ____________ is when objects contain their respective data and code.

Answers:

• Encapsulation

• Instantiation

• Modification

• Assignment

28. What is the base class of all other .Net classes?

Answers:

• assembly.root

• net.base

• system.object

• system.base

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

Answers:

• Dataset.SyncRequired

• Dataset.SaveRequired

• Dataset.IsDirty

• Dataset.HasChanges

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

Answers:

• Fixed

• Immutable

• Static

• Private

31. A property of an object can be another object.

Answers:

• False

• True

32. Protected methods of a class are accessible from their own class and from:

Answers:

• Abstract classes

• No other classes

• Derived classes

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

Answers:

• GoTo

• Else

• End If

• If Not

34. Terminate a For/Next loop with the _______ statement.

Answers:

• exit

• continue

• exit For

• exit Loop

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

Answers:

• Generic

• Dynamic

• Anonymous

• Fixed

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

Answers:

• False

• True

37. How many elements are there in the following array?   Dim X(3) as Integer

Answers:

• 4

• 3

• 0

38. What character precedes a hotkey or accelerator that you are creating?

Answers:

• - (hyphen)

• $ (dollar sign)

• & (ampersand)

• # (hash)

39. When declaring two methods with the same names but different parameter types, you should use which keyword?

Answers:

• Shadows

• Overrides

• Implements

• Overloads

40. In order to draw to a surface, use the ______________.

Answers:

• Pen Object

• Control Panel

• Paint event

• Graphics object

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

Answers:

• Dataset.Replicate

• Dataset.Copy

• Dataset.Clone

• Dataset.Duplicate

42. True or False?  A class have both a shared and non-shared constructor.

Answers:

• True

• False

43. The import required for the registry editing is

Answers:

• System.Security.Permissions

• Microsoft.Win32

• System.Security.AccessControl

• System.Security

44. How do you limit implicit type conversion in VB.NET?

Answers:

• Options Strict True

• Option Strict On

• Option Strict Off

• Option Strict = 1

45. How do you create a Read only Property in VB.NET

Answers:

• None of the above

• Using Only Get..EndGet with in property definition

• Using both Get and Set

• Using Only Set..EndSet with in property definition

46. BCL stands for?

Answers:

• Base Class Libraries

• Bass Class Language

• Binary Common Libraries

• Base Class Language

• Binary Class Language

47. Which of the method is used to display the form as modal?

Answers:

• Activate( )

• ShowDialog( )

• LoadDialog()

• ShowModal()

• Show( )

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

Answers:

• Generic

• Object

• Integer

• String

49. What is the purpose of Invoke Method?

Answers:

• None

• Both

• Used to call any procedure

• Used to call the procedure through Delegate variable

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

Answers:

• InputBox

• e.button

• KeyUp

• KeyPress

51. Which statement helps prevent multiple threads from accessing the same codeblock at the same time?

Answers:

• IsolateThreads

• MemLock

• SyncLock

• IsolateAccess

52. COMException class can be found in

Answers:

• System.Data

• System.Runtime.Interopservices

• System.Debug

• System.Exceptions

53. A class declared as friend is accessible from:

Answers:

• Anywhere in the same assembly

• Only methods in the same class

• Anywhere in another assembly

• Any derived class

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

Answers:

• Boxing

• Heaping

• Unstacking

• Registering

55. Which of the following is not a method of the Textbox class?

Answers:

• SuspendLayout()

• Flush()

• ToString()

• Update()

• Refresh()

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

Answers:

• Attach to each SQLClient.SQLCommand

• Attach to the SQLClient.SQLConnection

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

Answers:

• False

• True

58. Which of the following is the most valid example of the My object in Visual Basic?

Answers:

• Me.Text = My(Computer.FileSystem.SpecialDirectories.MyDocuments)

• The My object is not present in the Visual Basic language.

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

• Me.Text = My(Computer), FileSystem(SpecialDirectories),MyDocuments

59. True or False? By default, parameters are passed ByRef.

Answers:

• False

• True

60. Can an Enum be declared and exposed from within an Interface?

Answers:

• No

• Yes

61. Which control would you employ to present a yes/no value to an end user?

Answers:

• a radio button

• a check box

• a text field

• an accept button

62. The correct syntax for the event that is fired when the mouse pointer rests on a TextBox control is

Answers:

• OnMouseRest()

• OnMouseHover

• OnMouseUp()

• OnMouseOver()

63. To hold a money value, you would use the Object data type.

Answers:

• False

• TRUE

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

Answers:

• SetApartmentState

• Bond

• Merge

• Join

65. Do reference types or value types have their value stored on the stack?

Answers:

• Value

• Reference

66. Which is not a binding associated with WCF services?

Answers:

• WSFederationHttpBinding

• BasicHttpBinding

• NetNamedPipeBinding

• DiskSynchronousTransferBinding

67. Which keyword refers the parent of the current object

Answers:

• Me

• This

• Mybase

• Super

68. What is the difference between Or and OrElse?

Answers:

• Or can only be used for bitwise operations

• Or does not short-circuit, while OrElse does

• Or has higher precedence than OrElse

• Or was deprecated and replaced with OrElse

69. Which of the following is a valid declaration for a nullable integer type?

Answers:

• Dim? num As Integer

• Dim num As Nullable(of Integer)

• Dim num As Nullable Integer

• Dim num As Integer<Nullable>

70. If no access modifier is specified for a class, it is considered _______?

Answers:

• Private

• Public

• Protected

• Friend

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

Answers:

• A Pseudo Class

• An Enumerated Type

• A Generic Class

• An Anonymous Type

72. How many times can a class inherit from different parent classes?

Answers:

• 1

• unlimited

• 0

• 2

73. What is the value of b after this code is executed? Dim b As Boolean = Nothing

Answers:

• (this results in a runtime exception)

• Nothing

• True

• False

74. Extension methods may only be declared inside of:

Answers:

• Modules

• Abstract Classes

• Classes

• Interfaces

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

Answers:

• AllowMultiplePorts

• PortSharingEnabled

• EnablePortSharing

• PermitDuplicatePort

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

Answers:

• Short

• Char

• Integer

• Boolean

• String

77. 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?

Answers:

• Parent Shared, Parent Instance, Derived Shared, Parent Instance

• Derived Shared, Derived Instance, Parent Shared, Parent Instance

• Derived Shared, Parent Shared, Parent Instance, Derived Instance

• Parent Instance, Derived Instance, Derived Shared, Parent Shared

78. True or False? Tuples are value types as opposed to reference types.

Answers:

• False

• True

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

Answers:

• InternalsVisibleTo

• There is no such attribute

• ExposeAssemblyMethods

• AllowFriendVisibility

80. What is the value of DateTime.MinValue.Year?

Answers:

• 1

• 1970

• 1900

• 0

• -1

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

Answers:

• False

• True

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

Answers:

• True

• False