public string GetRSSUrl(SPList list)
{
string rssurl = string.Empty;
using (SPWeb web = new SPSite(list.ParentWeb.Url).OpenWeb())
{
rssurl = web.Url + "/_layouts/listfeed.aspx?list=" + list.ID;
}
return rssurl;
}
RSS feeds are generated with the help of listfeed.aspx which resides in the layouts folder. It take list id as parameter through querystring. Will be posting other overloaded methods for variants.