T
troy anderson
I have a System.Collections.Queue instance filled with floats and I would
like to convert it into a float [] because a third party plotting package
requires it. I have tried casting Queue.ToArray() via
float [] a = (float []) Queue.ToArray();
float [] a = Queue.ToArray() as float[]
no luck. Do I have to extract out each element from the Queue and place
them into my own allocated array?
float [] a = new float[Queue.Count];
int i=0;
foreach(float v in Queue) { a = v; i++;}
Is this very inefficient?
Thanks
like to convert it into a float [] because a third party plotting package
requires it. I have tried casting Queue.ToArray() via
float [] a = (float []) Queue.ToArray();
float [] a = Queue.ToArray() as float[]
no luck. Do I have to extract out each element from the Queue and place
them into my own allocated array?
float [] a = new float[Queue.Count];
int i=0;
foreach(float v in Queue) { a = v; i++;}
Is this very inefficient?
Thanks