gpt4 book ai didi

c# - VS2008 C# 错误 ".ctor' 语言不支持

转载 作者:行者123 更新时间:2023-12-03 22:01:30 25 4
gpt4 key购买 nike

C# 代码:

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);
}
}

正在调用托管 C++ 方法:

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

C#最后一行的语言错误不支持获取'.ctor'

最佳答案

只是一种预感,但我认为你需要改变

ArrayList catList, Boolean^ m_useConj

ArrayList^ catList, Boolean m_useConj

因为Boolean是值类型,ArrayList是引用类型。

关于c# - VS2008 C# 错误 ".ctor' 语言不支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2764845/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com