I have the list and need to make them uppercase if they contain specific letter.
I tried to use mean.ToString().ToUpper().Contains("g");
but it doesn't work.
static void Main(string[] args)
{
List<string> mean = new List<string>() { "dog", "smile", "cat",
"bat", "giraffe"};
// e.g. values containing letter "g" have to be changed to uppercase
// "dog" and "giraffe" should be changed to UPPERCASE
foreach (string s in mean)
{
Console.WriteLine(s);
}
}