Stack Overflow Asked by Ignacio Gomez on August 1, 2020
I need to remove from my string the last section from the ""
Input: C:qaweb2094Sitedasdasd.pdf
Expected Output: C:qaweb2094Site
You can try the below code
string s = "C:\qaweb2094\Site\dasdasd.pdf";
if (s.Contains("\"))
{
s = s.Substring(0, s.LastIndexOf("\"));
}
Correct answer by Sowmyadhar Gourishetty on August 1, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP