Mam taką oto funkcje serializującą:
public static async void Serialize(List<Zajecia> xml_List)
{
using (var stream = await ApplicationData.Current.LocalFolder.OpenStreamForWriteAsync("Plan list.xml", CreationCollisionOption.ReplaceExisting))
{
XmlSerializer serializer = new XmlSerializer(typeof(List<Zajecia>));
using (XmlWriter xmlWriter = XmlWriter.Create(stream, new XmlWriterSettings() { Indent = true }))
{
serializer.Serialize(xmlWriter, xml_List);
}
}
}
Gdy zostaje wywołane to jestem od razu poczęstowany czymś takim:
An unhandled exception of type 'System.InvalidOperationException' occurred in mscorlib.dll
Additional information: System.Runtime.InteropServices.WindowsRuntime.RuntimeClass is inaccessible due to its protection level. Only public types can be processed.
Problem polega na tym ze wszystko co tylko mozliwe w programie jest public (nie ma w tym wypadku zadnej potrzeby by cos bylo private). Moj problem polega na tym że ten wyjątek mi nic nie mówi to też nie wiem jak się go pozbyć.
Prosiłbym w związku z tym o jakąś pomoc.
dodanie znaczników <quote> dla treści błędu + rozdzielenie tagów wątku - fp