Hi Members,
I am new to this forum n i'm anil.....
i am developing a code for memorize game...... n my problem is
[b]i have 16 buttons and 8 images,i have to display exactly 2 times an image can be displayed on buttons.....i write code like this....
CODE
public memo()
{
Random r = new Random();
int picno;
picno = r.Next(0,ImagList.Images.Count);
button1.Image = ImagList.Images[picno];
picno = r.Next(0,ImagList.Images.Count);
button2.Image = ImagList.Images[picno];
picno = r.Next(0,ImagList.Images.Count);
button3.Image = ImagList.Images[picno];
;;;
;;;;
;;;
}
i'm getting the images randomly on my buttons but some images are coming more than 2 times....
to avoid that i want a solution......
i tried alot but i did not suceedeed.....
thanks in advance to all of them sending the responses.........
This post has been edited by anee4u: 15 Oct, 2008 - 10:36 AM