Quote:
contains method not shown intelisense
That's because
Contains
is not a static method: it's an instance method so you call it on the actual string:
if (business.Cuisine.Contains("chicken"))
{
...
And there is no
Contains
method that allows you to specify case insensitivity.
But the IndexOf method deos, as you have found on the internet.
But as I explained to you when you were trying it with Regexes:
How to handle null values in regx.ismatch[
^]
You need to check and handle nulls yourself! The system will not do that for you - that is by design, and is absolutely correct...
Please, after 104 questions, you should be pretty competent in this stuff now, not making exactly the same mistake over and over again ... which make you look like you are learning absolutely nothing here, and that would just make you a Help Vampire.