windowsphone开发吧 关注:171贴子:427
  • 0回复贴,共1

C++/CX 索引属性问题

只看楼主收藏回复

在开发一个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#中完全没有这个问题啊。求大神解释。。。~~~


IP属地:广东1楼2014-09-01 21:34回复