SyntaxFix
Write A Post
Hire A Developer
Questions
You need to check your statement like this :
string url = "www.example.com/aaa/bbb.jpg"; string lenght = url.Lenght-4; if(url.Lenght > 15)//eg 15 { string newString = url.Substring(18, lenght); }