Get license file from a folder in C# project

Posted by daft on Stack Overflow See other posts from Stack Overflow or by daft
Published on 2010-04-20T08:50:25Z Indexed on 2010/04/20 8:53 UTC
Read the original article Hit count: 217

Filed under:
|
|
|

I have a license file that I need to access at runtime in order to create pdf-files. After I have created the in memory pdf, I need to call a method on that pdf to set the license, like this:

pdf.SetLicense("pathToLicenseFileHere");

The license file is located in the same project as the.cs-file that creates the pdf, but is in a separate folder. I cannot get this simple thing to behave correctly, which makes me a bit sad, since it really shouldn't be that hard. :(

I try to set the path like this:

string path = @"\Resources\File.lic";

But it just isn't working out for me.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#