C++/CLI界面中仅限Getter的属性

Oha*_*der 12 c++-cli properties interface

以下C#声明的等效C++/CLI语法是什么(如果存在):

interface MyInterface
{
    int MyProperty {get;}
}
Run Code Online (Sandbox Code Playgroud)

Arm*_*yan 22

interface class MyInterface
{
    property int MyProperty 
    {
       int get();
    }
};
Run Code Online (Sandbox Code Playgroud)

这里的例子

  • `接口类`,请注意.但物业是对的. (3认同)