string FindFile(string name) { foreach (string dir in this.SearchDirs) { string full = Path.Combine(dir, name); if (File.Exists(full)) return full; } if (File.Exists(name)) return name; throw new ResolveException("File {0} not found", name); }