c# set variable to an object with arrays code example Example: c# array float[] array = new float[] { 1f, 5f, 4f, 3f };