I am getting a C++/CLI array type is not allowed here error when using array type in a class. First I have created a Console application in Visual Studio 2013 and added a new class "MainClass". Then I added a new method. The thing is that I used array in the same project in the main cpp file with no classes with no problems and it seems like it's being used the same way in this example. Here's MainClass.h:
#pragma once
#using <System.dll>
#using <System.Security.dll>
#include <windows.h>
using namespace System;
using namespace System::Security;
using namespace System::Security::Cryptography;
using namespace System::Security::Cryptography::X509Certificates;
using namespace System::IO;
using namespace System::Collections::Generic;
ref class MainClass
{
public:
MainClass();
bool Verify(array<System::Byte> DataToVerify);
};
MainClass.cpp:
#include "MainClass.h"
#using <System.dll>
#using <System.Security.dll>
#include <windows.h>
using namespace System;
using namespace System::Security;
using namespace System::Security::Cryptography;
using namespace System::Security::Cryptography::X509Certificates;
using namespace System::IO;
using namespace System::Collections::Generic;
MainClass::MainClass()
{
}
bool MainClass::Verify(array<System::Byte> DataToVerify)
{
return false;
}