编译器错误 C3291

“default”: 不能作为 trivial 属性的名称

Trivial 属性不能命名为 default。 有关更多信息,请参见 property

示例

以下示例生成 C3291。

// C3291.cpp
// compile with: /clr /c
ref struct C {
   property System::String ^ default;   // C3291
   property System::String ^ Default;   // OK
};