嗨我有這個類來保存RSS提要項目。我有他們的列表,我想將它存儲在Windows Phone 7的獨立存儲中。有人可以幫我解決這個問題。我知道如何序列化該類並將其作爲單個RSS項目的單個對象保存在隔離存儲中。如何保存wp7中隔離存儲中的對象列表
public class RssItem
{
public RssItem(string title, string summary, string publishedDate, string url ,string subtitle ,string duration, Enclosure enclosure)
{
Title = title;
Summary = summary;
PublishedDate = publishedDate;
Url = url;
Subtitle = subtitle;
Enclosure = enclosure;
Duration = duration;
PlainSummary = HttpUtility.HtmlDecode(Regex.Replace(summary, "<[^>]+?>", ""));
}
public string Title { get; set; }
public string Summary { get; set; }
public string PublishedDate { get; set; }
public string Url { get; set; }
public string PlainSummary { get; set; }
public Enclosure Enclosure { get; set; }
public string Description { get; set; }
public string Mp3Url { get; set; }
public string Subtitle { get; set; }
public string Duration { get; set; }
}
任何幫助,將不勝感激。謝謝。
有無你認爲一行一行還是以JSON保存? – onmyway133
不,我還沒有嘗試過..但是有什麼方法可以在隔離存儲中直接保存列表嗎? –