0

How do I assign a populated array to a declared variable?

Lets assume we have something like this:

    private float[] myArray;

    myArray = {1.0f, 0.5f, 1.0f};

I really like to do all the assignments in one go without having to access each individual index or use the Add function.

For example javascript allows me to do this:

var myArray;

myArray = [0, 1];
Asperger
  • 2,754
  • 6
  • 40
  • 91

0 Answers0