The following sample shows that property, a context-sensitive keyword, can be used to define a property and a variable.
// context_sensitive_keywords.cpp
// compile with: /clr
public ref class C {
int MyInt;
public:
C() : MyInt(99) {}
property int Property_Block {
int get() { return MyInt; }
}
};
int main() {
int property = 0;
C ^ MyC = gcnew C();
property = MyC->Property_Block;
System::Console::WriteLine(++property);
}