Sha256: a3b5199e76fbbb61bd4c0ccc51d2ec31f7ecbdc946edfe4d7200bb3afa2345f5
Contents?: true
Size: 553 Bytes
Versions: 35
Compression:
Stored size: 553 Bytes
Contents
#pragma once ref class ArrayHelper { public: static array<int>^ ToArray(const int items[], const int length) { auto managedItems = gcnew array<int>(length); for(auto index = 0; index < length; ++index) { managedItems[index] = items[index]; } return managedItems; } static int* FromArray(array<int>^ items) { auto unmanagedArray = new int[items->Length]; auto index = 0; for each(auto item in items) { unmanagedArray[index++] = item; } return unmanagedArray; } };
Version data entries
35 entries across 35 versions & 1 rubygems