PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You have created a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The existing service interface is named IMyService, and contains the following code segment.

[ServiceContract(Name=”SvcOrder”,
Namespace=”http://contoso.com/services”)]
public interface IMyService
{
[OperationContract]
void DoSomething();
}

You create a new service named IMyServiceV1 that contains an operation named DoSomethingElse. You need to ensure that existing client applications are still able to access the

IMyService.DoSomething
method without modifying client code.

Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
[ServiceContract(Namespace=”http: //contoso.com/services/V1″)]
public interface IMyServiceV1 : IMyService
{
[OperationContract]
void DoSomethingElse();
}

B.
[ServiceContract(Name=”SvcOrder”)]
public interface IMyServiceV1 : IMyService
{
[OperationContract]
void DoSomethingElse();
}

C.
[ServiceContract(Name=”SvcOrderV1″, Namespace=”http: //contoso.com/services”)]
public interface IMyServiceV1 : IMyService
{
[OperationContract]
void DoSomethingElse();
}

D.
[ServiceContract(Name=”SvcOrder”, Namespace=”http: //contoso.com/services”)]
public interface IMyServiceV1 : IMyService
{
[OperationContract]
void DoSomethingElse();
}

One Comment on “Which code segment should you use?


Leave a Reply