Compiler Error C3908
access level less restrictive than 'construct'
A property accessor method (get or set) cannot have less restrictive access than the access specified on the property itself. Similarly, for event accessor methods.
For more information, see property and event.
The following sample generates C3908:
// C3908.cpp
// compile with: /clr
ref class X {
protected:
property int i {
public: // C3908 property i is protected
int get();
private:
void set(int); // OK more restrictive
};
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for