Question #335377

A string with any message. Then, determine if the message contains the string, "hello".


Expert's answer

string message = Console.ReadLine(); // Initializing a string with user input

if (message.Contains("hello"))
{
  Console.WriteLine("Message contains string \"hello\"");
}
else
{
  Console.WriteLine("Message doesn't contain string \"hello\"");
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS