Array creation syntax was used to create an array of managed objects. You cannot create an array of managed objects using native array syntax. Ex:
// compile with: /clr
int main() {
int^ arr[5]; // C2728
}
Possible resolution:
// compile with: /clr
int main() {
array<int>^arr2;
}
Give some more code examples that may trigger this error.
This article is a derivative work based on Compiler Error C2728 which is provided by MSDN Community Content - Visual C++.