string myString = www.stackoverflow.com
i need to check if myString ends with
.
and any 3 other characters after it, i would prefer to do it with theEndsWith()
method but if that's not possible any other way will work.How can i check if myString contains a
.
that has anything butwww
behind it (and i'd like to know how to check if it has any Y amount of characters before/after it), i tried thisif (!myString.Contains(".".StartsWith("www")) && myString.Contains(".")) { Console.WriteLine("Test"); }
But it gives an error saying it can't convert from bool to string, i also tried creating dynamic dot = ".";
and using it in place of "."
and even though it compiled it would still crash when i run it.