I got asked this in one of my article forums, and thought I’d blog about it here so I can just direct people to a single URL if the question comes up again. Here’s how you’d do it (I used the example property the OP used):
//The header file
ref class Test
{
public:
property Byte default[int]
{
Byte get(int index);
void set(int index, Byte value);
}
//...
};
//The cpp file
Byte Test::default::get(int index)
{
return 0;
}
void Test::default::set(int index, Byte value)
{
}
//...