Hello everyone .. I am new to c# technology..
I am trying to write an app which store some data in a xml file...
I am getting System.NullReferenceException ...
Below is the code
public void StoreFeedData(string title,Uri url)
{
XmlDocument xmldoc = new XmlDocument();
XmlElement rss = xmldoc.CreateElement("rss");
XmlElement rsstitle = xmldoc.CreateElement("title");
rsstitle.InnerText = title;
rss.AppendChild(rsstitle);
XmlElement rsslink = xmldoc.CreateElement("link");
rsslink.InnerText = url.ToString();
rss.AppendChild(rsslink);
xmldoc.DocumentElement.InsertAfter(rss, xmldoc.DocumentElement.LastChild);
//INSTANCE OF FILE IS CREATED
FileStream fs = new FileStream("\\Program Files\\RssFeed\\feedlist.xml",FileMode.Append,FileAccess.Read,FileShare.None);
//xmldoc.Load(fs);
//XML DOCUMENT SAVED
xmldoc.Save(fs);
fs.Close();
ny one have ny idea.. please help me...