Grzesiek Zimnoch Grzesiek Zimnoch - 4 months ago 18
C# Question

c# how to write "if contains substring"?

Can someone tell me how it should look?

if (foundWord.value.Contains("przedaw".Substring(1, 7)))
for foundWord.value == "Sprzedawca" or "Sprzedawca:" or "Sprzedawca: " or "sprzedawca" etc...?



You don't need substring here.

if (foundWord.value.Contains("przedaw"))

if you want to be case insensitive, you may use a ToLower()

if (foundWord.value.ToLower().Contains("przedaw"))