I have a cursor file in project. I have given the absolute path in code i.e
F:/r.cur
the problem is this is hard-coded path And i Want
Super late to this party, but this works for me when I'm in unit tests.
var currentDirectory = Directory.GetCurrentDirectory();
If you need the root of the project, and not the bin directory then this:
var currentDirectory = Directory.GetCurrentDirectory();
var basePath = currentDirectory.Split(new string[] { "\\bin" }, StringSplitOptions.None)[0];
It'll be different if you're on a website.