G
Guest
Can someone pls give some comments about the following codes of interface and implements ?
2 files, ITrans.cs and DDDBIQ.cs (is part of the whole solution)
In file ITrans.cs,
namespace Trans
{
public interface ITrans
{
string DoTrans(string strXML);
}
}
In file DDDBIQ.cs,
using CDBUtil;
namespace Trans
{
public class DDDBIQ : ITrans
{
static string DoTrans(string strXML)
{
Log.WriteLine(strXML, "DoTrans");
return "<XML><ValidCode>Axis</ValidCode><STATUS>00</STATUS></XML>";
}
}
}
When I build the solution, I have the following error.
C:\Inetpub\wwwroot\CDBWebService\Trans\DDDBIQ.cs(5): 'Trans.DDDBIQ' does not implement interface member 'Trans.ITrans.DoTrans(string)'. 'Trans.DDDBIQ.DoTrans(string)' is either static, not public, or has the wrong return type.
How to reslove this? Thanks.
2 files, ITrans.cs and DDDBIQ.cs (is part of the whole solution)
In file ITrans.cs,
namespace Trans
{
public interface ITrans
{
string DoTrans(string strXML);
}
}
In file DDDBIQ.cs,
using CDBUtil;
namespace Trans
{
public class DDDBIQ : ITrans
{
static string DoTrans(string strXML)
{
Log.WriteLine(strXML, "DoTrans");
return "<XML><ValidCode>Axis</ValidCode><STATUS>00</STATUS></XML>";
}
}
}
When I build the solution, I have the following error.
C:\Inetpub\wwwroot\CDBWebService\Trans\DDDBIQ.cs(5): 'Trans.DDDBIQ' does not implement interface member 'Trans.ITrans.DoTrans(string)'. 'Trans.DDDBIQ.DoTrans(string)' is either static, not public, or has the wrong return type.
How to reslove this? Thanks.