次の方法で共有


コンパイラ エラー C3296

'property': この名前のプロパティが既に存在します

コンパイラは同じ名前の 1 つ以上のプロパティを見つけました。 1 つの型の各プロパティには、一意の名前が必要です。

詳細については、「 property」を参照してください。

次の例では C3296 が生成されます。

// C3296.cpp
// compile with: /clr /c
using namespace System;

ref class R {
public:
   property int MyProp[int] { int get(int); }

   property String^ MyProp[int] { void set(int, String^); }   // C3296
};