Application C # does not load XML file by the application to start with Windows

0

I have an application that reads an XML file when it is opened, done this manually, but if the application to start with windows does not read the file.

    
asked by anonymous 16.10.2014 / 13:25

1 answer

1

If the XML is in the same location as your executable, use the following code:

string caminho = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "\arquivo.xml");
    
06.11.2014 / 04:33