You can do one of:
array<int> ^int_array = { 0x3, 0x9, 0x7 };
or:
int_array = gcnew array<int>(3) { 0x3, 0x9, 0x7 };
or:
array<int> ^int_array = gcnew array<int>(3) { 0x3, 0x9, 0x7 };
i.e., the value initializer must occur in the same statement as array
creation.

Signature
David Anton
http://www.tangiblesoftwaresolutions.com
Convert between VB, C#, C++, and Java
Instant C#
Instant VB
Instant C++
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
> I'm using VC++ 2005 Express in /cli mode, and I'm trying to initialize an
> array of integers. Something like:
[quoted text clipped - 6 lines]
>
> How is this done? Thanx in advance...
Peter Oliphant - 20 Sep 2007 15:15 GMT
Yup, that'll do it! Thanks David! :)
[==Peter==]
> You can do one of:
> array<int> ^int_array = { 0x3, 0x9, 0x7 };
[quoted text clipped - 16 lines]
>>
>> How is this done? Thanx in advance...