在开发一个APP,得使用一个索引属性访问,而且这个组建是用C++/CX写的。如下:
public ref class A sealed
{
public:
property int default[int]
{
int get(int index);
}
...
private:
...
}
可是显示的错误为:"Indexed property with a public *get* or *set* accessor is not allowed!"。这也有点太离谱,在C#中完全没有这个问题啊。求大神解释。。。~~~
public ref class A sealed
{
public:
property int default[int]
{
int get(int index);
}
...
private:
...
}
可是显示的错误为:"Indexed property with a public *get* or *set* accessor is not allowed!"。这也有点太离谱,在C#中完全没有这个问题啊。求大神解释。。。~~~