c# - XmlDocument.Load get stuck? -



c# - XmlDocument.Load get stuck? -

i'm trying load xml files path in windows forms application.

public static classlayout getclasslayout() { xmldocument doc = new xmldocument(); doc.load(environment.currentdirectory + @"files\class.xml"); homecoming serializer.xmldeserialize<classlayout>(doc.outerxml); }

but on reaching doc.load line it's getting stuck. i'm not getting results.

try combine path - environment.currentdirectory not end "\"

public static classlayout getclasslayout() { xmldocument doc = new xmldocument(); doc.load(system.io.path.combine(environment.currentdirectory, @"files\class.xml")); homecoming serializer.xmldeserialize<classlayout>(doc.outerxml); }

c# xml winforms

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -