Class persistence in C#
<p>For a class project I am creating an RSS reader in C#. I have classes built for Channels, Feeds, and Articles.</p>

<p>My main class MainView  has a List Channels that will hold all the channels.</p>

<p>A Channel is just an organization class to hold feeds. (ie "Sports", "Technology" could be channels). A Channel has a List feeds that holds all the feeds. So if you have a channel, "Sports", and you create an RSS feed for ESPN, then I instantiate a Feed class. </p>

<p>However, I am not sure how to make my Channels List in the MainView class persist across all other classes. When I want to Add a Channel I create a pop-up form class (class addChannel) that allows user input. But in order to access the Channels List in the MainView I have to pass it into the constructor of the addChannel which just copies the List correct? So now when I manipulate the list in the addChannel class, I am not modifying the original right?</p>

<p>I am just so used to C where I can just pass pointers around and modify the original variable directly in memory. So before I continue making my program worst, I want to see if I am doing this all correct or not.</p>

<p>Let me know if there is any specific code you would like me to post.</p>

<p>This code is in my MainView class</p>

<pre><code> private void addBtn_Click(object sender, EventArgs e)
        {

            addChannel newChannel = new addChannel(channelTree, Channels);
            newChannel.Show();

        }

 public List&lt;Channel&gt; Channels;
</code></pre>

<p>And this code is in the addChannel class</p>

<pre><code>private void button1_Click(object sender, EventArgs e)
        {


            // I want to access the channelTree treeView here
            channel = new Channel(this.channelTitle.Text, this.channelDesc.Text);

            // Save the info to an XML doc
            channel.Save();

            // So here is where I want to add the channel to the List, but am not sure if it persists or not
            channels.Add(channel);


            // Now add it to the tree view
            treeView.Nodes.Add(channel.Title);

            this.Close();
        }
</code></pre>
