文档介绍:Exam Name: TS: Microsoft .NET Framework -Application Development Foundation
Exam Type: Microsoft
Exam Code: 70-536 Total Questions: 255
Question: 1
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 MyDictionaryImplements 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
Question: 2
You write a class named Employee that includes the following code segment.
Private m_EmployeeId As String
Private m_EmployeeName As String
Private m_JobTitleName As String
Public Function GetName() As String
Return m_EmployeeName
End Function
Public Function GetTitle() As String
Return m_JobTitleName
End Function
End Class
You need to expose this class in a type library. interface must also facilitate
patibility across new versions of the Employee class. You need to choose a method
for generating interface.
What should you do?
A. Add the following attribute to the class definition.<ClassInterface()>
_Public Class Employee
B. Add the following attribute to the class
definition.<ClassInterface()> _Public Class Employee
C. Add the following attribute to the class definition.<ComVisible(True)> _Public Class Employee
D. Define an interface for the class and add the following attribute to the class
definition.<ClassInterface()> _Public Class EmployeeImplements
IEmployee
Answer: D
Question: 3
You are developing a custom event handler to automatically print all open documents.
The event handler helps specify the number of copies to be printed. You need to develop a
custom