Out string array in abstract c# method implemented in C++

  • Thread starter Thread starter GTraceski
  • Start date Start date
G

GTraceski

Hi,

I have the following parent class public definition:
abstract public bool IsValidForInspection(out string[]
strFailureReasons);

In my managed CPP class I am trying to understand what needs to be
here, I have tried:

bool MILGeometricModelFinder::IsValidForInspection([Out]String __gc*
(__gc*) pprStrFailureReasons __gc[])

But the compiler isn't happy and says my pure virtual function isn't
declared with:
: cannot instantiate abstract class
due to following members:
'bool IsValidForInspection(System::String __gc *(__gc *)
__gc[])' : pure virtual function was not defined

I am new to c# ( if not obvious)...

Thanks in advance for any help in understanding!
 
Hi,

I have the following parent class public definition:
abstract public bool IsValidForInspection(out string[]
strFailureReasons);

Using C++/CLI, that would be:

bool MILGeometricModelFinder::IsValidForInspection([Out]
array<System::String^>^% strFailureReasons)

Managed Extensions for C++ are dead, don't use them.
In my managed CPP class I am trying to understand what needs to be
here, I have tried:

bool MILGeometricModelFinder::IsValidForInspection([Out]String __gc*
(__gc*) pprStrFailureReasons __gc[])

But the compiler isn't happy and says my pure virtual function isn't
declared with:
: cannot instantiate abstract class
due to following members:
'bool IsValidForInspection(System::String __gc *(__gc *)
__gc[])' : pure virtual function was not defined

I am new to c# ( if not obvious)...

Thanks in advance for any help in understanding!
 
Back
Top