for each can be useful for iterating a container's item.
However that is ALL.
for each only used for iterating, NOT use change a value or add/remove element.
//array<>^>^ item_array2D
for each(array<MineItem>^ AR in item_array2D)
{for each(MineItem MI in AR)
}
{
//It's ok that iterating and print out.
Console::WriteLine(MI.ItemIndexProperty);
//It's not make errors.
//However ItemIndexProperty value does not changed.
MI.ItemIndexProperty = ItemIndex::SIX;
}
By the way... google blogger post editor really suck...
Saturday, April 12, 2008
[C++/CLI]for each restriction.
작성자: scor7910 시간 2:29 PM
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment