0
我想序列化我的查詢。我所做的:Linq查詢serializaton(WPF,C#,XmlSerializer)
MyDBViewDataContext db = new MyDBViewDataContext();
List<test_view> tvq = (from tt in db.test_views
select tt).ToList();
const string filename = "serial_file.xml";
XmlSerializer serializer = new XmlSerializer(typeof(test_view));
FileStream stream = new FileStream(filename,FileMode.Create);
serializer.Serialize(stream, tvq);
stream.Close();
但什麼是錯的,因爲我得到了錯誤:
謝謝* * ** TRIV!剛剛測試,它的工作:) – 4est
很高興它有幫助... – TriV