You can have basic .NET data types as members of your managed class (static int i) or pointers to something unmanaged (DWORD * pid, HANDLE * handle), but you are not allowed to have an unmanaged object directly, but an array of integers for this goal is considered an unmanaged object.
Since the only thing that gives you the problem is an unmanaged array, you can switch it to a managed array.
public ref class Klient
{
public:
Klient(){}
static array<DWORD,2>^ klienty = gcnew array<DWORD,2>(41,2);
static int i = 1;
static DWORD* pid;
static HANDLE* handle;
};
, , , . ( , .)
public class HolderOfUnmanagedStuff
{
public:
DWORD klienty[41][2];
int i;
DWORD* pid;
HANDLE* handle;
HolderOfUnmanagedStuff()
{
i = 1;
}
};
public ref class Klient
{
public:
Klient(){}
static HolderOfUnmanagedStuff* unmanagedStuff = new HolderOfUnmanagedStuff();
};