I have Json file in string (for example):
@{
"Url": "http://site.com/?q=windows8"
}
How can i take the information after ?q=
on c# (windows 8). Sorry for my English.
I have Json file in string (for example):
@{
"Url": "http://site.com/?q=windows8"
}
How can i take the information after ?q=
on c# (windows 8). Sorry for my English.
You can do simply this :
string s = "myURL/?q=windows8";
// Loop through all instances of ?q=
int i = 0;
while ((i = s.IndexOf("?q=", i)) != -1)
{
// Print out the substring. Here : windows8
Console.WriteLine(s.Substring(i));
// Increment the index.
i++;
}