编译器错误 C3803

“property”:属性具有与其某一个访问器“accessor”不兼容的类型。

使用 property 定义的属性类型与其某一个访问器函数的返回类型不匹配。

下面的示例生成 C3803:

// C3803.cpp
struct A
{
   __declspec(property(get=GetIt)) int i;
   char GetIt()
   {
      return 0;
   }

   /*
   // try the following definition instead
   int GetIt()
   {
      return 0;
   }
   */
}; // C3803

int main()
{
}