Question Can not deserialize a file

SamTheT

New member
Joined
Aug 21, 2015
Messages
1
Programming Experience
Beginner
Hey everyone, in my project I deserialize an xml file in order to load the info to the class and it all went good ..before I added Farseer Physics. Now it just won't load and says "An exception of type 'System.InvalidOperationException' occurred in System.Xml.dll but was not handled in user code." I'm 100% sure that this is the source of the prblem, because when I remove physics everything is good again. What does this "was not handled in user code" mean?? I broke my head thinking about it and it really starts to annoy me since no info is given anywhere.

code for the xml loader:
C#:
public T Load(string path)        {
            T instance;
            using (TextReader reader = new StreamReader(path))
            {
                XmlSerializer xml = new XmlSerializer(Type);
                instance = (T)xml.Deserialize(reader);
            }
            return instance;

        }


Please help me, I'm desperate
 
Back
Top Bottom