1. Question: Which of the following are keyed hashing algorithms? (Choose all that apply.)

    A
    RIPEMD160

    B
    HMACSHA1

    C
    SHA512

    D
    MACTripleDES

    E
    MD5

    Note: Not available
    1. Report
  2. Question: You are creating a new .NET Framework application that will replace an existing unmanaged application. Although you have long-term plans to replace all unmanaged code, in the interim you need to call an unmanaged method in a COM object. How can you do this? (Choose two; each correct answer is part of a complete solution.)

    A
    Create an instance of the Marshal class

    B
    Create a prototype method for the COM function

    C
    Add DllImportAttribute

    D
    Call the Marshal.Copy method

    Note: Not available
    1. Report
  3. Question: You need to call a static function in a COM object. The function is named MyFunc and is located in the MyApp.dll library. In your .NET Framework application, you want to call it using the name MyMethod. Which code sample allows you to do this?

    A
    <DllImport("MyApp.dll", EntryPoint := "MyFunc")> _
    Public Sub MyMethod(ByVal text As String)
    End Sub

    B
    <DllImport("MyApp.dll", EntryPoint := "MyMethod")> _
    Public Sub MyFunc(ByVal text As String)
    End Sub

    C
    <DllImport("MyApp.dll", BestFitMapping := "MyFunc")> _
    Public Sub MyMethod(ByVal text As String)
    End Sub

    D
    <DllImport("MyApp.dll", BestFitMapping := "MyMethod")> _
    Public Sub MyFunc(ByVal text As String)
    End Sub

    Note: Not available
    1. Report
  4. Question: You are creating a class that will be accessed by COM applications. Which of the following should you do? (Choose all that apply.)

    A
    Make the class abstract

    B
    Create all methods as public

    C
    Create all methods as static

    D
    Provide a default constructor

    Note: Not available
    1. Report
  5. Question: You are creating a class that will be accessed from COM applications. You want changes made to parameters to be available to the calling application. Which of the following attributes should you apply to the parameters? (Choose all that apply.)

    A
    ClassInterfaceAttribute

    B
    InAttribute

    C
    OutAttribute

    D
    AutomationProxyAttribute

    Note: Not available
    1. Report
  6. Question: You are creating a .NET Framework application that needs to call methods located in a COM object. You want to create a .NET Framework assembly using the COM object so that you can reference it more easily in your project. Which tool should you use?

    A
    Tlbimp.exe

    B
    Tlbexp.exe

    C
    Regasm.exe

    D
    Regedit.exe

    Note: Not available
    1. Report
  7. Question: You need to load an assembly and run a method contained within a type dynamically. Which class should you use to run the method?

    A
    MethodBase

    B
    MethodInfo

    C
    MethodBuilder

    D
    ConstructorInfo

    Note: Not available
    1. Report
  8. Question: You need to write code equivalent to the following, but using reflection:
    Dim d As New DateTime(2008, 5, 1)
    Console.WriteLine(d.ToShortDateString())
    Which code sample does this correctly?

    A
    Dim t As Type = GetType(DateTime)
    Dim mi As MethodInfo = t.GetConstructor( _
    New Type() {GetType(Integer), GetType(Integer), GetType(Integer)})
    Dim d As Object = mi.Invoke(New Object() {2008, 5, 1})
    Dim dToShortDateString As ConstructorInfo = t.GetMethod("ToShortDateString")
    Console.WriteLine(DirectCast(dToShortDateString.Invoke(d, Nothing), String))

    B
    Dim t As Type = GetType(DateTime)
    Dim ci As ConstructorInfo = t.GetConstructor(New Object() {2008, 5, 1})
    Dim d As Object = ci.Invoke( _
    New Type() {GetType(Integer), GetType(Integer), GetType(Integer)})
    Dim dToShortDateString As MethodInfo = t.GetMethod("ToShortDateString")
    Console.WriteLine(DirectCast(dToShortDateString.Invoke(d, Nothing), String))

    C
    Dim t As Type = GetType(DateTime)
    Dim dToShortDateString As MethodInfo = t.GetMethod("ToShortDateString")
    Console.WriteLine(DirectCast(dToShortDateString.Invoke(t, Nothing), String))

    D
    Dim t As Type = GetType(DateTime)
    Dim ci As ConstructorInfo = _
    t.GetConstructor(New Type() {GetType(Integer), GetType(Integer),
    GetType(Integer)})
    Dim d As Object = ci.Invoke(New Object() {2008, 5, 1})
    Dim dToShortDateString As MethodInfo = t.GetMethod("ToShortDateString")
    Console.WriteLine(DirectCast(dToShortDateString.Invoke(d, Nothing), String))

    Note: Not available
    1. Report
  9. Question: You need to examine an assembly’s metadata from an application. The assembly is located in the GAC. However, the assembly was developed for a different platform, and you cannot run the code contained within the assembly. Which method should you call?

    A
    Assembly.ReflectionOnlyLoad

    B
    Assembly.LoadFrom

    C
    Assembly.LoadFile

    D
    Assembly.ReflectionOnlyLoadFrom

    Note: Not available
    1. Report
  10. Question: From which of the following sources can you attach a file to an e-mail message? (Choose all that apply.)

    A
    Local file system

    B
    Stream

    C
    Web site

    D
    An incoming e-mail message

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