tags:

views:

193

answers:

2

C# code:

class Program
{
    static void Main(string[] args)
    { 
        TFWrapper tf;
        String lexDir = ".......";
        String lic = "........";
        String key = ".........";
        ArrayList cats = new ArrayList();
        Boolean useConj = false;
        String lang = "english";
        String encoding = "auto";
        tf = new TFWrapper(lexDir, lic, key, cats, useConj, lang, encoding);
    }
}  

Managed C++ method being called:

TFWrapper::TFWrapper(String^ mlexDir, String^ mlic, String^ mkey, ArrayList catList, Boolean^ m_useConj, String^ m_lang, String^ m_encoding);  

Getting '.ctor' is not supported by the language error on the last line of C#

+4  A: 

Just a hunch, but I think you need to change

ArrayList catList, Boolean^ m_useConj

to

ArrayList^ catList, Boolean m_useConj

Because Boolean is a value type and ArrayList a reference type.

Henk Holterman
Good catch either way :) +1
leppie
Tried that and all permutation, no joy
Jim Jones
A: 

Try calling this in your C#:

tf = new TFWrapper(lexDir, lic, key, cats, useConj, lang, encoding);

Also, in your C++ declaration, shouldn't ArrayList catList be ArrayList^ catlist?

Damian Powell