SyntaxFix
Write A Post
Hire A Developer
Questions
First find the index of text and then substring
var ind = Directory.GetCurrentDirectory().ToString().IndexOf("TEXT To find"); string productFolder = Directory.GetCurrentDirectory().ToString().Substring(0, ind);