I would like to know, how i can read and write zenon variable(bool) in vsta.

Now i am reading by:

for (int y = 0; y <6; y++)
arraystring[y] = this.Variables().Item("Palet1_bool[" + y+"]").get_Value(0).ToString();
arraybool[y] = Convert.ToBoolean(arraystring[y]);

and writing by:

this.Variables().Item("Palet1_int["+ a +"]").set_Value(0, arrayint[a]);

for example int i read without problems, but bool i cant read.

thank you