T
The unProfessional
Any know how to convert a managed array to an unmanaged array (ptr)?
// Managed
float[] f = new float [6];
// Unmanaged
unsafe
{
float *pArray = f; // No good
float *pArray = (float*) f; // Compiler still doesn't allow it
}
I'm assuming there might be some marshalling involved.
Also, are unsafe {} blocks the only way to combined managed and unmanaged
logic?
Sorry... I'm still pretty new to mixing managed and unmanaged code.
// Managed
float[] f = new float [6];
// Unmanaged
unsafe
{
float *pArray = f; // No good
float *pArray = (float*) f; // Compiler still doesn't allow it
}
I'm assuming there might be some marshalling involved.
Also, are unsafe {} blocks the only way to combined managed and unmanaged
logic?
Sorry... I'm still pretty new to mixing managed and unmanaged code.