The zoneIndex in the MoveWebPart() method will be used to specify where in the zone the webpart should be placed. For example, if you have 3 webparts in one zone, and you want to change the order of the webparts, you use the ZoneIndex.
For example the following code will move the first webparts in the first zone, and place it after the second webpart in the zone:
Webpartmanager1.MoveWebPart(Webpartmanager1.WebParts[0], Webpartmanager1.Zones.Item[0], 2)
If you want the webpart to be at the top of the zone, you will change the zone index to 0.
So there is no need to iterate through all of the zones to move a webpart to a specific zone.
/Fredrik Normén -
fredrikn @ twitterASPInsider
Microsoft MVP, MCSD, MCAD, MCT
ASPInsidersMy Blog