G
Guest
Hi.
I have an interface written in managed C++. I try to implement the interface
in C#. I try to override the function, but the compiler says no suitable
function can be found to override. If I remove this function the compiler
complains that it is not implemented. The code is below. I can implement the
interface both from within the original assembl and from a managed C++
assembly. Any ideas about what might be going on?
The c++ code:
#pragma once
#include "ProfileWrapper.h"
#include "ProfileSlab.h"
using namespace System;
namespace ReflectometryModelNative
{
public interface class IProfileConverter
{
public:
System::Int32 ConvertProfile(System::Int32 originalProfile);
};
}
the c# code:
public class MockProfileConverter :
ReflectometryModelNative.IProfileConverter
{
public MockProfileConverter()
{
}
public override int ConvertProfile(int a)
{
return a;
}
}
I have an interface written in managed C++. I try to implement the interface
in C#. I try to override the function, but the compiler says no suitable
function can be found to override. If I remove this function the compiler
complains that it is not implemented. The code is below. I can implement the
interface both from within the original assembl and from a managed C++
assembly. Any ideas about what might be going on?
The c++ code:
#pragma once
#include "ProfileWrapper.h"
#include "ProfileSlab.h"
using namespace System;
namespace ReflectometryModelNative
{
public interface class IProfileConverter
{
public:
System::Int32 ConvertProfile(System::Int32 originalProfile);
};
}
the c# code:
public class MockProfileConverter :
ReflectometryModelNative.IProfileConverter
{
public MockProfileConverter()
{
}
public override int ConvertProfile(int a)
{
return a;
}
}