Use the mono_array_new_* methods to create arrays of a given type.
For example, the following code creates an array with two elements of type System.Byte, and sets the values 0xca and 0xfe on it:
MonoArray *CreateByteArray (MonoDomain *domain) { MonoArray *data; data = mono_array_new (domain, mono_get_byte_class (), 2); mono_array_set (data, guint8, 0, 0xca); mono_array_set (data, guint8, 0, 0xfe); return data; }
These methods are used to manipulate objects of type System.Nullable<T>