For some calculations I need to use Floats, but I have an byte[] at my disposal so I first do:
Array.Copy(byteArray, floatArray, byteArray.Length);
That works great, I the do some calulations on the floats.but now I need to convert it back to an byteArray. I can't use the following code, it crashes, without giving an specific error message.
float[] DiffernetfloatArray= new float[ byteArray];
Array.Copy(DiffernetfloatArray, byteArray, DiffernetfloatArray.Length);
First I thought it was the size that wasn't OK, but the float array that I'm using, I increased the size by 500 just for testing, still gave me same error
Does anyone know how I could fix this? Preferably answers in C#