nerdexam
Microsoft

70-513 · Question #61

You are creating a Windows Communication Foundation (WCF) service. You do not want to expose the internal implementation at the service layer. You need to expose the following class as a service…

The correct answer is C. [ServiceContract(Name="Arithmetic")]. See the full explanation below for the reasoning.

Question

You are creating a Windows Communication Foundation (WCF) service. You do not want to expose the internal implementation at the service layer. You need to expose the following class as a service named Arithmetic with an operation named Sum:

public class Calculator { public int Add(int x, int y) { } } Which code segment should you use?

Options

  • A[ServiceContract(Namespace="Arithmetic")]
  • B[ServiceContract(ConfigurationName="Arithmetic")]
  • C[ServiceContract(Name="Arithmetic")]
  • D[ServiceContract(Name="Arithmetic")]

How the community answered

(56 responses)
  • A
    13% (7)
  • B
    4% (2)
  • C
    77% (43)
  • D
    7% (4)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice