我有一些 C++ 库。而且我还为它获得了 C++/CLI 包装器,以便可以在 C# 代码中调用该库中的方法。
假设我想在 C# 中使用一些调用,如下所示:
string date = MyWrapper.GetValue("SystemSettings", "BuildDate", null);
这将在 C++/CLI 上调用下一个函数:
static String^ GetValue(String^ section, String^ key, String^ defaultValue)
我的问题:我得到了下一个 ArgumentNullException:
值不能为空。\r\n参数名称: managedString。
所以...问题:我应该如何null
正确通过?谢谢。