Quote Originariamente inviata da renygade Visualizza il messaggio
In attesa che qualcuno mi spieghi
Basterebbe leggere prima la documentazione della For Each, ad esempio quella ufficiale

http://msdn.microsoft.com/en-us/libr...=vs.84%29.aspx

dove dice

Traversing Arrays. Because the Array class implements the IEnumerable interface, all arrays expose the GetEnumerator method.This means that you can iterate through an array with a For Each...Next loop.However, you can only read the array elements.You cannot change them.


Per rimediare, accedi agli elementi dell'array con un classico ciclo

codice:
        For ix As Integer = 0 To s.Length - 1
            s(ix).X = 10
            Debug.Print("ciclo" & s(ix).X.ToString)
        Next
        Debug.Print(s(0).X.ToString)