I take a web service written in VB and rewrite it in C #. The service class implements two interfaces, each of which has four methods. Three of the four methods have the same method name and parameter list. The 4th method has the same name but a different list of parameters.
In VB, you explicitly define interface methods associated with public service class methods. So, for the same methods, the implementation is as follows:
class WebServiceClass
{
Public Function Method1(result as Int32) As String Implements Interface1.Method1, Interface2.Method1
Public Sub Method2(Id as Int64, P3 as Int32) Implements Interface1.Method2
Public Sub Method3(In as Int64) Implements Interface2.Method2
}
Can you do this in C #?
I know that you can explicitly define methods in a web service class with an interface. Method2 (Id as Int64, ...) and Interface2.Method2 (In as ...). But this will mean a change in the names of these methods, and therefore any application using these methods must be updated.
-, , , .
-, -, - ?