Reputation:
I want to pick my XHTML dtd file from a default location like the bin folder ( where exe file of project resides) and not by hard coding it by giving the exact path of the file like C:\temp\xhtml1.dtd. My code is in C#. Can anyone help how to do it?
Upvotes: 0
Views: 982
Reputation: 1063453
One option is to use the application-base:
string path = Path.Combine(
AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
"foo.dtd");
Upvotes: 3
Reputation: 46811
I think this might be what you want?
string xhtml = Directory.GetCurrentDirectory()+"xhtml1.dtd";
Upvotes: 0