Array of Classes, with c# and silver light.

Aug 30 2008 9:26 PM
I have found i can make an array of my classes.
But when i try to add picture to my layout Root, it doesn't seem to work if i use a class.

This works
public Image myPicture= new Image();
LayoutRoot.Children.Add(myPicture);

But this doesnt work. Why?
public Image[] myPicture= new Image[2];
LayoutRoot.Children.Add(myPicture[0]);

Any help would be great, i know i can use list for this, but i relly want to use arrays if possible.

Note: i am decently knew to c# and silver light, classes and objects are some what new to me. but i think i am getting it.

Answers (2)