编译器警告(等级 1)C4817

“member”:非法使用“.”访问该成员;编译器已将其替换为“->”

使用了错误的成员访问运算符。

示例

以下示例生成 C4817:

// C4817.cpp
// compile with: /clr /W1
using namespace System;
int main() {
   array<Int32> ^ a = gcnew array<Int32>(100);
   Console::WriteLine( a.Length );   // C4817
   Console::WriteLine( a->Length );   // OK
}