#include "stdafx.h"
using namespace System;
ref class MyObject
{
};
int main()
{
array^ array_of_buf = gcnew array(10);
for each (MyObject^ bref in array_of_buf)
{
bref = gcnew MyObject();
}
interior_ptr ptr_buf;
for (ptr_buf = &array_of_buf[0]; ptr_buf <= &array_of_buf[9]; ptr_buf++)
{
MyObject^ buf = *ptr_buf;
// use the MyObject class
}
}