1
下面是我宣佈接口:如何在託管C++中實現接口?
[ServiceContract]
public interface class IShedluer
{
[OperationContract]
array<Object^>^ GetResult(UInt64 taskId);
}
下面是試圖實現它的類:
ref class MyShedluer:IShedluer
{
Shedluer ^shedluer;//this is NOT MyShedluer
public:
MyShedluer(void);
array<Object^>^ GetResult(UInt64 taskId)
{
return shedluer->GetResult(taskId);
}
}
當我嘗試編譯此,我越來越
Error 15 error C3766: 'MyShedluer' must provide an implementation for
the interface method 'cli::array<Type> ^IShedluer::GetResult(unsigned __int64)'
d:\users\menkaur\documents\visual studio 2010\projects\MyProject\
\kernel\MyShedluer.h 78 1 MyProject.Kernel
爲什麼我得到這個?