2 years ago

#74002

test-img

ILovePizza

c# How to use Contains() and ignore lower & upper case? vs 2022

I am using this code:

if (tweet.FullText.ToLower().Contains(hashtag.ToLower()))

To check if the tweet contain a certain hashtag. Is there a better way check it without the ToLower() on both sided? Anyway to make the Contains ignore the lower & upper case differences?

Thx

c#

asp.net

.net

visual-studio

contains

0 Answers

Your Answer

Accepted video resources