每個屬性只可以指定一個 'get' 方法
您只能在屬性get指定一個函式。 指定多個 get 函式時,就會發生此錯誤。
範例
下列範例會產生 C2776:
// C2776.cpp
struct A {
__declspec(property(get=GetProp,get=GetPropToo))
// try the following line instead
// __declspec(property(get=GetProp))
int prop; // C2776
int GetProp(void);
int GetPropToo(void);
};