想问一下 CLR 为什么 使用不了 ref 和 out 关键字
时间蜕变 2016-11-08 04:32:22 using namespace System;
using namespace System::Runtime::InteropServices;
namespace Noah
{
public ref class IniLite
{
public:
IniLite();
~IniLite();
void getItemKeyValue(Int32 sectionPos,ref Int32 itemPos, String^ keyName, String^ valueName);
}
这段代码会提示
error C2061: syntax error: identifier 'ref'
1>CLRDLL.cpp(122): error C2511: 'void Noah::IniLite::getItemKeyValue(int,int,System::String ^,System::String ^)': overloaded member function not found in 'Noah::IniLite'
1> e:\vstest\clrdll\clrdll\CLRDLL.h(14): note: see declaration of 'Noah::IniLite'
1>CLRDLL.cpp(125): error C2227: left of '->getItemKeyValue' must point to class/struct/union/generic type