I know the class name. Now i want to know the path of this class present in the current working solution. Eg: I have a solution in visual studio which contains 5 projects- A, B, C, D, E. C is my startup project. I know the class "abc.cs" which can be present in any of these 5 projects. Is there a way to find the path to this class file using c#?
I have tried this:
var fileName= @"abc.cs";
FileInfo f = new FileInfo(filename);
This throws exception that file does not exist, as it looks into current working directory.
Aucun commentaire:
Enregistrer un commentaire