1. Question: You need to create a method to clear a Queue named q. Which code segment should you use?

    A
    Dim e As Object For Each e In Dequeue

    B
    Dequeue () Next

    C
    Dim e As Object For Each e In q

    D
    Enqueue (Nothing) Next

    E
    q.Clear ()

    F
    q.Dequeue ()

    Note: Not available
    1. Report
  2. Question: You are creating a class that uses unmanaged resources. This class maintains references to managed resources on other objects. You need to ensure that users of this class can explicitly release resources when the class instance ceases to be needed. Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)

    A
    Define the class such that it implements the IDisposable interface.

    B
    Define the class such that it inherits from the WeakReference class.

    C
    Create a Dispose method that calls System.GC.Collect to force garbage collection.

    D
    Create a Dispose method that releases unmanaged resources and calls methods on other objects to release the managed resources.

    E
    Create a class destructor that calls methods on other objects to release the managed resources.

    F
    Create a class destructor that releases the unmanaged resources.

    Note: Not available
    1. Report
  3. Question: You need to write a multicast delegate that accepts a DateTime argument. Which code segment should you use?

    A
    Public Delegate Function PowerDeviceOn( _ ByVal autoPowerOff As DateTime) _ As Boolean

    B
    Public Delegate Sub PowerDeviceOn( _ ByVal autoPowerOff As DateTime)

    C
    Public Delegate Function PowerDeviceOn( _ ByVal result As Boolean, _ ByVal autoPowerOff As DateTime) _ As Integer

    D
    Public Delegate Function PowerDeviceOn( _ ByVal sender As Object, _ ByVal autoPowerOff As EventArgs) _ As Boolean

    Note: Not available
    1. Report
  4. Question: You need to identify a type that meets the following criteria:
    Is always a number.
    Is not greater than 65,535.
    Which type should you choose?

    A
    System.IntPtr

    B
    int

    C
    System.UInt16 "A Composite Solution With Just One Click" - Certification Guaranteed 165 Microsoft 70-536 Exam

    D
    System.String

    Note: Not available
    1. Report
  5. Question: 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 ")
    "A Composite Solution With Just One Click" - Certification Guaranteed 166 Microsoft 70-536 Exam 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"}

    Note: Not available
    1. Report
  6. Question: You are writing an application that uses SOAP to exchange data with other applications. You use a Department class that inherits from ArrayList to send objects to another application. The Department object is named dept.
    You need to ensure that the application serializes the Department object for transport by using SOAP.
    Which code should you use?

    A
    Dim formatter As New SoapFormatter()
    Dim myStream As New MemoryStream()
    Dim o as Object
    For Each o In dept
    formatter.Serialize(myStream, o)
    Next

    B
    Dim formatter As New SoapFormatter()
    Dim buffer As Byte() = New Byte(dept.Capacity)
    Dim myStream As New MemoryStream(buffer)
    formatter.Serialize(myStream, dept)

    C
    Dim formatter As New SoapFormatter()
    Dim buffer As Byte() = New Byte(dept.Capacity) {}
    "A Composite Solution With Just One Click" - Certification Guaranteed 167 Microsoft 70-536 Exam
    Dim myStream As New MemoryStream(buffer)
    Dim o As Object
    For Each o In dept
    formatter.Serialize(myStream, o)
    Next

    D
    Dim formatter As New SoapFormatter()
    Dim myStream As New MemoryStream()
    formatter.Serialize(myStream, dept)

    Note: Not available
    1. Report
  7. Question: You are writing a method to compress an array of bytes. The bytes to be compressed are passed to the method in a parameter named document. You need to compress the contents of the incoming parameter. Which code segment should you use?

    A
    Dim inStream As New MemoryStream(document)
    Dim zipStream As New GZipStream( _
    inStream, CompressionMode.Compress)
    Dim result(document.Length) As Byte
    zipStream.Write(result, 0, result.Length)
    Return result

    B
    Dim outStream As New MemoryStream
    Dim zipStream As New GZipStream( _
    outStream, CompressionMode.Compress)
    zipStream.Write(document, 0, document.Length)
    zipStream.Close()
    Return outStream.ToArray

    C
    Dim objStream As New MemoryStream(document)
    Dim zipStream As New GZipStream( _
    objStream, CompressionMode.Compress)
    zipStream.Write(document, 0, document.Length)
    zipStream.Close()
    Return objStream.ToArray

    D
    Dim objStream As New MemoryStream(document)
    Dim zipStream As New GZipStream( _
    objStream, CompressionMode.Compress)
    Dim outStream As New MemoryStream
    Dim b As Integer
    While (b = zipStream.ReadByte)
    outStream.WriteByte(CByte(b))
    End While
    "A Composite Solution With Just One Click" - Certification Guaranteed 168 Microsoft 70-536 Exam Return outStream.ToArray

    Note: Not available
    1. Report
  8. Question: You are testing a component that serializes the Meeting class instances so that they can be saved to the file system. The Meeting class has the following definition:Public Class MeetingPrivate title As StringPublic roomNumber As IntegerPublic invitees As String()Public Sub New()End SubPublic Sub New(ByVal t As String)title = tEnd SubEnd ClassThe component contains a procedure with the following code segment.Dim myMeeting As New Meeting("Goals")myMeeting.roomNumber = 1100Dim attendees As String() = New String(1) {"John", "Mary"}myMeeting.invitees = attendeesDim xs As New XmlSerializer(GetType(Meeting))Dim writer As New StreamWriter("C:\Meeting.xml")xs.Serialize(writer, myMeeting)writer.Close()You need to identify the XML block that is written to the C:\Meeting.xml file as a result of running this procedure.Which XML block represents the content that will be written to the C:\Meeting.xml file?

    A
    <?xml version="1.0" encoding="utf-8"?> <Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance"> <roomNumber>1100</roomNumber> <invitees> <string>John</string> <string>Mary</string> </invitees> </Meeting>

    B
    <?xml version="1.0" encoding="utf-8"?> <Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance"> <title>Goals</title> <roomNumber>1100</roomNumber> <invitee>John</invitee> <invitee>Mary</invitee> </Meeting>

    C
    <?xml version="1.0" encoding="utf-8"?> <Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance"> <roomNumber>1100</roomNumber> <invitees> <string>John</string> </invitees> <invitees> <string>Mary</string> </invitees> </Meeting>

    D
    <?xml version="1.0" encoding="utf-8"?> <Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" title="Goals"> <roomNumber>1100</roomNumber> <invitees> <string>John</string> <string>Mary</string> </invitees> </Meeting>

    Note: Not available
    1. Report
  9. Question: You are defining a class named MyClass that contains several child objects. MyClass contains a method named ProcessChildren that performs actions on the child objects. MyClass objects will be serializable. You need to ensure that the ProcessChildren method is executed after the MyClass object and all its child objects are reconstructed. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

    A
    Specify that MyClass implements the IDeserializationCallback interface.

    B
    Apply the OnDeserializing attribute to the ProcessChildren method.

    C
    Create an OnDeserialization method that calls ProcessChildren.

    D
    Specify that MyClass inherits from the ObjectManager class.

    E
    Create a GetObjectData method that calls ProcessChildren.

    F
    Apply the OnSerialized attribute to the ProcessChildren method.

    Note: Not available
    1. Report
  10. Question: You need to write a code segment that transfers the contents of a byte array named dataToSend by using a NetworkStream object named netStream. You need to use a cache of size 8,192 bytes. Which code segment should you use?

    A
    Dim memStream As New MemoryStream(8192)
    memStream.Write(dataToSend, 0, _
    CType(netStream.Length, Integer))

    B
    Dim bufStream As New BufferedStream(netStream, 8192) bufStream.Write(dataToSend, 0,
    dataToSend.Length)

    C
    Dim memStream As New MemoryStream(8192)
    netStream.Write(dataToSend, 0, _
    CType(memStream.Length, Integer))

    D
    Dim bufStream As New BufferedStream(netStream)
    bufStream.Write(dataToSend, 0, 8192)

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd