1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Initializing array of objects

Discussion in 'C#' started by imported_bojomojo, Aug 28, 2010.

  1. imported_bojomojo

    imported_bojomojo New Member

    Joined:
    Aug 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I am initializing and array of objects, i need something like this:

    Greyhound[1].StartingPosition = pictureBox1.Location;
    Greyhound[2].StartingPosition = pictureBox2.Location;

    and so on.. but I need to make it by a loop

    for ( ......... ) { Greyhound.StartingPosition = ????????? // what should go here }
     

Share This Page