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
  • 3,064
  • 8
  • 52
  • 100

0 Answers0