namespace ConsoleApplication1 using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace ConsoleApplication1 { public class Item { public Item() { someData = 0; }
public int someData; }
public class ItemList { public ItemList() { itemCount = 0; }
public ItemList(int count) { itemCount = count; items = new Item[count]; }
public int itemCount; public Item[] items; }
class Program { static void Main(string[] args) { ItemList myItemList = new ItemList(2); myItemList.items[0].someData = 100; } }
}
|