Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

Microsoft 70-536(VB) Exam - Cheat-Test.com

Free 70-536(VB) Sample Questions:

1. You are developing an application that stores data about your company's sales and technical support teams.
You need to ensure that the name and contact information for each person is available as a single collection when a user queries details about a specific team. You also need to ensure that the data collection guarantees type safety.
Which code segment should you use?
A. Dim team As Hashtable = New Hashtable()
team.Add(1, "Hance")
team.Add(2, "Jim")
team.Add(3, "Hanif")
team.Add(4, "Kerim")
team.Add(5, "Alex")
team.Add(6, "Mark")
team.Add(7, "Roger")
team.Add(8, "Tommy")
B. Dim team As ArrayList = New ArrayList()
team.Add("1, Hance")
team.Add("2, Jim")
team.Add("3, Hanif")
team.Add("4, Kerim")
team.Add("5, Alex")
team.Add("6, Mark")
team.Add("7, Roger")
team.Add("8, Tommy")
C. Dim team As New Dictionary(Of Integer, String)
team.Add(1, "Hance")
team.Add(2, "Jim")
team.Add(3, "Hanif")
team.Add(4, "Kerim")
team.Add(5, "Alex")
team.Add(6, "Mark")
team.Add(7, "Roger")
team.Add(8, "Tommy")
D. Dim team As String() = New String() { _
"1, Hance", _
"2, Jim", _
"3, Hanif", _
"4, Kerim", _
"5, Alex", _
"6, Mark", _
"7, Roger", _
"8, Tommy"}
Answer: C

2. You are writing a method that returns an ArrayList named al.
You need to ensure that changes to the ArrayList are performed in a thread-safe manner.
Which code segment should you use?
A. Dim al As ArrayList = New ArrayList()
SyncLock al.SyncRoot
Return al
End SyncLock
B. Dim al As ArrayList = New ArrayList()
SyncLock al.SyncRoot.GetType()
Return al
End SyncLock
C. Dim al As ArrayList = New ArrayList()
Monitor.Enter(al)
Monitor.Exit(al)
Return al
D. Dim al As ArrayList = New ArrayList()
Dim sync_al as ArrayList = ArrayList.Synchronized(al)
Return sync_al
Answer: D

3. You are writing a custom dictionary. The custom-dictionary class is named MyDictionary.
You need to ensure that the dictionary is type safe.
Which code segment should you use?
A. Class MyDictionary
Implements Dictionary(Of String, String)
B. Class MyDictionary
Inherits HashTable
C. Class MyDictionary
Implements IDictionary
D. Class MyDictionary
...
End Class
Dim t As New Dictionary(Of String, String)
Dim dict As MyDictionary = CType(t, MyDictionary)
Answer: A

4. You are instantiating a variable to store only strings. The variable is named messageStore.
You need to ensure that string messages are read and processed in the order in which they are received.
Which code segment should you use?
A. Dim messageStore As New Stack(Of String)
messageStore.Push("This is a test message.")
B. Dim messageStore As New Stack()
messageStore.Push("This is a test message.")
C. Dim messageStore As New Queue()
messageStore.Enqueue("This is a test message.")
D. Dim messageStore As New Queue(Of String)
messageStore.Enqueue("This is a test message.")
Answer: D

5. You are developing an application to assist the user in conducting electronic surveys. The survey consists of 25 true-or-false questions.
You need to perform the following tasks:
·Initialize each answer to true.
·Minimize the amount of memory used by each survey.
Which storage option should you choose?
A. Dim answers As New BitVector32(1)
B. Dim answers As New BitVector32(-1)
C. Dim answers As New BitArray(1)
D. Dim answers As New BitArray(-1)
Answer: B

6. You are creating a class named Age.
You need to ensure that the Age class is written such that collections of Age objects can be sorted.
Which code segment should you use?
A. Public Class Age
Public Value As Integer
Public Function CompareTo(ByVal obj As Object) As Object
If TypeOf obj Is Age Then
Dim _age As Age = CType(obj, Age)
Return Value.CompareTo(obj)
End If
Throw New ArgumentException("object not an Age")
End Function
End Class
B. Public Class Age
Public Value As Integer
Public Function CompareTo(ByVal iValue As Integer) As Object
Try
Return Value.CompareTo(iValue)
Catch
Throw New ArgumentException ("object not an Age")
End Try
End Function
End Class
C. Public Class Age
Implements IComparable
Public Value As Integer
Public Function CompareTo(ByVal obj As Object) As Integer _
Implements IComparable.CompareTo
If TypeOf obj Is Age Then
Dim _age As Age = CType(obj, Age)
Return Value.CompareTo(_age.Value)
End If
Throw New ArgumentException("object not an Age")
End Function
End Class
D. Public Class Age
Implements IComparable
Public Value As Integer
Public Function CompareTo(ByVal obj As Object) As Integer _
Implements IComparable.CompareTo
Try
Return Value.CompareTo((CType(obj, Age)).Value)
Catch
Return -1
End Try
End Function
End Class
Answer: C

7. You are creating a class named Temperature. The Temperature class contains a public field named F.
The public field F represents a temperature in degrees Fahrenheit.
You need to ensure that users can specify whether a string representation of a Temperature instance displays the Fahrenheit value or the equivalent Celsius value.
Which code segment should you use?
A. Public Class Temperature
Implements IFormattable
Public F As Integer
Public Function ToString(ByVal format As String, _
ByVal fp As IFormatProvider) As String _
Implements IFormattable.ToString
If (format = "F" Or format = Nothing) Then
Return F.ToString()
End If
If format = "C" Then
Return ((F - 32) / 1.8).ToString()
End If
Throw New FormatException("Invalid format string")
End Function
End Class
B. Public Class Temperature
Implements ICustomFormatter
Public F As Integer
Public Function Format(ByVal formatString As String, _
ByVal arg as object, ByVal fp As IFormatProvider) _
As String Implements ICustomFormatter.Format
If formatString = "C" Then
Return ((F - 32) / 1.8).ToString()
End If
If formatString = "F" Then
Return arg.ToString()
End If
Throw New FormatException("Invalid format string")
End Function
End Class
C. Public Class Temperature
Public F As Integer
Public Function ToString(ByVal format As String, _
ByVal fp As IFormatProvider) As String
If format = "C" Then
Return ((F - 32) / 1.8).ToString()
Else
Return Me.GetType().ToString()
End If
End Function
End Class
D. Public Class Temperature
Public F As Integer
Protected format As String
Public Overrides Function ToString() As String
If format = "C" Then
Return ((F - 32) / 1.8).ToString()
End If
Return F.ToString()
End Function
End Class
Answer: A

8. You write the following code.
Public Delegate Sub FaxDocs(ByVal sender As Object, _
ByVal args as FaxArgs)
You need to create an event that will invoke FaxDocs.
Which code segment should you use?
A. Public Shared Event Fax As FaxDocs
B. Public Shared Event FaxDocs As FaxArgs
C. Public Class FaxArgs
Inherits EventArgs
Private coverPageInfo As String
Public Sub New(ByVal coverInfo As String)
Me.coverPageInfo = coverInfo
End Sub
Public ReadOnly Property CoverPageInformation As String
Get
Return Me.coverPageInfo
End Get
End Property
End Class
D. Public Class FaxArgs
Inherits EventArgs
Private coverPageInfo As String
Public ReadOnly Property CoverPageInformation As String
Get
Return Me.coverPageInfo
End Get
End Property
End Class
Answer: A

9. You need to write a multicast delegate that accepts a DateTime argument.
Which code segment should you use?
A. Public Delegate Function PowerDeviceOn( _
ByVal result As Boolean, _
ByVal autoPowerOff As?DateTime) _
As Integer
B. Public Delegate Function PowerDeviceOn( _
ByVal sender As Object, _
ByVal autoPowerOff As EventArgs) _
As Boolean
C. Public Delegate Sub PowerDeviceOn( _
ByVal autoPowerOff As DateTime)
D. Public Delegate Function PowerDeviceOn( _
ByVal autoPowerOff As DateTime) _
As Boolean
Answer: C

10. You develop a service application named FileService. You deploy the service application to multiple servers on your network.
You implement the following code segment. (Line numbers are included for reference only.)
01 Public Sub StartService(ByVal serverName As String)
02 Dim crtl As ServiceController = _
03 New ServiceController("FileService")
04 If crtl.Status = ServiceControllerStatus.Stopped Then
05 End If
06 End Sub
You need to develop a routine that will start FileService if it stops. The routine must start FileService on the server identified by the serverName input parameter.
Which two lines of code should you add to the code segment? (Each correct answer presents part of the solution. Choose two.)
A. Insert the following line of code between lines 03 and 04:
crtl.ServiceName = serverName
B. Insert the following line of code between lines 03 and 04:
crtl.MachineName = serverName
C. Insert the following line of code between lines 03 and 04:
crtl.Site.Name = serverName
D. Insert the following line of code between lines 04 and 05:
crtl.Continue()
E. Insert the following line of code between lines 04 and 05:
crtl.Start()
F. Insert the following line of code between lines 04 and 05:
crtl.ExecuteCommand(0)
Answer: BE

11. You are developing a routine that will periodically perform a calculation based on regularly changing values from legacy systems. You write the following lines of code. (Line numbers are included for reference only.)
01 Dim exitLoop As Boolean = False
02 Do
03
04 exitLoop = PerformCalculation()
05 Loop While Not exitLoop
You need to write a code segment to ensure that the calculation is performed at 30-second intervals. You must ensure that minimum processor resources are used between the calculations.
Which code segment should you insert at line 03?
A. Thread.Sleep(30000)
B. Thread.SpinWait(30000)
C. Dim thrdCurrent As Thread = Thread.CurrentThread
thrdCurrent.Priority = ThreadPriority.BelowNormal
D. Dim thrdCurrent As Thread = Thread.CurrentThread
thrdCurrent.Priority = ThreadPriority.Lowest
E. Thread.SpinWait(30)
Answer: A

12. You are developing an application to perform mathematical calculations. You develop a class named CalculationValues. You write a procedure named PerformCalculation that operates on an instance of the class.
You need to ensure that the user interface of the application continues to respond while calculations are being performed. You need to write a code segment that calls the PerformCalculation procedure to achieve this goal.
Which code segment should you use?
A. Private Sub PerformCalculation()
...
End Sub
Private Sub DoWork()
Dim myValues As New CalculationValues()
Dim newThread As New Thread( _
New ThreadStart(AddressOf PerformCalculation))
newThread.Start(myValues)
End Sub
B. Private Sub PerformCalculation()
...
End Sub
Private Sub DoWork()
Dim myValues As New CalculationValues()
Dim delStart As New ThreadStart( _
AddressOf PerformCalculation)
Dim newThread As New Thread(delStart)
If newThread.IsAlive Then
newThread.Start(myValues)
End If
End Sub
C. Private Sub PerformCalculation ( _
ByVal values As CalculationValues)
...
End Sub
Private Sub DoWork()
Dim myValues As New CalculationValues()
Application.DoEvents()
PerformCalculation(myValues)
Application.DoEvents()
End Sub
D. Private Sub PerformCalculation ( _
ByVal values As Object)
...
End Sub
Private Sub DoWork()
Dim myValues As New CalculationValues()
Dim newThread As New Thread( _
New ParameterizedThreadStart( _
AddressOf PerformCalculation))
newThread.Start(myValues)
End Sub
Answer: D

13. You need to write a code segment that will create a common language runtime (CLR) unit of isolation within an application.
Which code segment should you use?
A. Dim mySetup As AppDomainSetup = _
AppDomain.CurrentDomain.SetupInformation
mySetup.ShadowCopyFiles = "true"
B. Dim myProcess As System.Diagnostics.Process
myProcess = New System.Diagnostics.Process()
C. Dim domain As AppDomain
domain = AppDomain.CreateDomain("MyDomain")
D. Dim myComponent As System.ComponentModel.Component
myComponent = New System.ComponentModel.Component()
Answer: C

14. You need to write a code segment that will assign the name of the configuration file that the current application domain uses to a string variable named configFile.
Which two code segments should you use to achieve the goal? (Each correct answer presents a complete solution. Choose two.)
A. Dim domain As AppDomain = AppDomain.CurrentDomain
configFile = _
domain.GetData("APP_CONFIG_FILE").ToString()
B. Dim domain As AppDomain = AppDomain.CurrentDomain
Dim setup As AppDomainSetup = domain.SetupInformation
configFile = setup.ConfigurationFile
C. Dim domain As AppDomain = AppDomain.CurrentDomain
Dim setup As New AppDomainSetup()
configFile = setup.ConfigurationFile
D. Dim setup As New AppDomainSetup()
Dim domain As AppDomain = _
AppDomain.CreateDomain("current", Nothing, setup)
configFile = setup.ConfigurationFile
Answer: AB

15. You are developing an application that dynamically loads assemblies from an application directory.
You need to write a code segment that loads an assembly named Assembly1.dll into the current application domain.
Which code segment should you use?
A. Dim domain As AppDomain = AppDomain.CurrentDomain
Dim myPath As String = _
Path.Combine(domain.BaseDirectory, "Assembly1.dll")
Dim asm As [Assembly] = [Assembly].LoadFrom(myPath)
B. Dim domain As AppDomain = AppDomain.CurrentDomain
Dim myPath As String = _
Path.Combine(domain.BaseDirectory, "Assembly1.dll")
Dim asm As [Assembly] = [Assembly].Load(myPath)
C. Dim domain As AppDomain = AppDomain.CurrentDomain
Dim myPath As String = _
Path.Combine(domain.DynamicDirectory, "Assembly1.dll")
Dim asm As [Assembly] = _
AppDomain.CurrentDomain.Load(myPath)
D. Dim domain As AppDomain = AppDomain.CurrentDomain
Dim asm As [Assembly] = domain.GetData("Assembly1.dll")
Answer: A


© 2014 Cheat-Test.com, All Rights Reserved