What is the proper way to handle an array of one class in another class?
<p>Here are two simple classes to illustrate my question:</p>

<pre><code>class Widget
{
    private int _widgetID;
    public int WidgetID
    {
        get { return _widgetID; }
        set { _widgetID = value; }
    }

    private int _categoryID;
    public int CategoryID
    {
        get { return _categoryID; }
        set { _categoryID = value; }
    }

    private string _widgetName;
    public string WidgetName
    {
        get { return _widgetName; }
        set { _widgetName = value; }
    }
}
</code></pre>

<p>And them the second class:</p>

<pre><code>class WidgetCategory
{
    private int _widgetCategoryID;
    public int WidgetCategoryID
    {
        get { return _widgetCategoryID; }
        set { _widgetCategoryID = value; }
    }

    private Widget[] _widgets;
    public Widget[] Widgets
    {
        get { return _widgets; }
        set { _widgets = value; }
    }

    private string _widgetCategoryName;
    public string WidgetCategoryName
    {
        get { return _widgetCategoryName; }
        set { _widgetCategoryName = value; }
    }
}
</code></pre>

<p>How would I handle this situation in the most efficient way?</p>

<p>Also, so you know, I will need to nest other classes the same way below the Widget class.</p>
