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

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!
 
B

Ben Voigt [C++ MVP]

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top