Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 743 Bytes

compiler-error-c2776.md

File metadata and controls

27 lines (23 loc) · 743 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2776
Compiler Error C2776
11/04/2016
C2776
C2776
9d80addc-62c7-40fc-a2cc-60303abb87df

Compiler Error C2776

only one 'get' method can be specified per property

You can only specify one get function in the property extended attribute. This error occurs when multiple get functions are specified.

The following sample generates 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);
};