Reach functionality from other class c#
<h1>update</h1>

<p>I'm writing a silverlight application and I have the following Class "Home", in this class a read a .xml file a write these to a ListBox. In a other class Overview I will show the same .xml file. I know it is stupid to write the same code as in the class "Home".</p>

<p>The problem is, how to reach these data.</p>

<p>My question is how can I reuse the method LoadXMLFile() from another class?</p>

<p>The code.</p>

<p>// Read the .xml file in the class "Home"</p>

<pre><code>public void LoadXMLFile()
    {
        WebClient xmlClient = new WebClient();
        xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(XMLFileLoaded);
        xmlClient.DownloadStringAsync(new Uri("codeFragments.xml", UriKind.RelativeOrAbsolute));
    }
            private void XMLFileLoaded(object sender, DownloadStringCompletedEventArgs e)
    {    
        if (e.Error == null)
        {
            string xmlData = e.Result;
            XDocument xDoc = XDocument.Parse(xmlData);

            var tagsXml = from c in xDoc.Descendants("Tag") select c.Attribute("name");

            List&lt;Tag&gt; lsTags = new List&lt;Tag&gt;();

            foreach (string tagName in tagsXml)
            {
                Tag oTag = new Tag();
                oTag.name = tagName;
                var tags = from d in xDoc.Descendants("Tag") 
                                       where d.Attribute("name").Value == tagName
                                       select d.Elements("oFragments");
                var tagXml = tags.ToArray()[0];

                foreach (var tag in tagXml)
                {                       
                    CodeFragments oFragments = new CodeFragments();                        
                    oFragments.tagURL = tag.Attribute("tagURL").Value;
                    //Tags.tags.Add(oFragments);
                    oTag.lsTags.Add(oFragments);

                }
                lsTags.Add(oTag);
            }

            //List&lt;string&gt; test = new List&lt;string&gt; { "a","b","c" };
            lsBox.ItemsSource = lsTags;

        }
    }
</code></pre>
