Perhaps I am thinking too much along the lines of dynamic duck-type langagues (python and JavaScript). But how do I make the array below that is declared at compile time to shrink to a smaller size?
public struct Centroid
{
public float x;
public float y;
public int count;
public float strength;
}
centers = new Centroid[1024];
and now I want to re-size it at runtime with a computed value: starCount
centers = new Centroid[starCount];
UPDATE
[Yes, I would like to use List<> generics] but I am stuck in that I need to read a GPU array and move it to the C# array, and I also need an array since I need to send the results to Matlab via the .net interface.]