Is it possible to declare method in service interface without operationcontract attribute?
Example is mention below.
[ServiceContract]
interface IService
{
[OperationContract]
void Display();
//Without Operation contract
void Show();
}
class Service : IService
{
public void Display()
{
throw new NotImplementedException();
}
public void Show()
{
throw new NotImplementedException();
}
}
1. If yes then what is use of it.
Interviewer asked me this question recently. Please help me.