string.ToLower() returns a new string containing all lowercase characters. So your code should read like this:
if (firstInput.ToLower() == "action"){
{
The .ToLower() transforms firstInput into an all-lowercase string. When you compare that with an all lowercase string literal for "action", the compare will succeed if firstInput contains "action" in any upper or lower case form (Action, action, aCtIoN, etc).
It's worth noting that the Microsoft .Net documentation tells you how to use string.ToLower(). As part of learning how to program in C#, you should get used to checking the Microsoft .Net documentation to learn how to use functionality provided by the framework. The string.ToLower() article provides a complete code sample:
using System;
public class ToLowerTest {
public static void Main() {
string [] info = {"Name", "Title", "Age", "Location", "Gender"};
Console.WriteLine("The initial values in the array are:");
foreach (string s in info)
Console.WriteLine(s);
Console.WriteLine("{0}The lowercase of these values is:", Environment.NewLine);
foreach (string s in info)
Console.WriteLine(s.ToLower());
}
}
// The example displays the following output:
// The initial values in the array are:
// Name
// Title
// Age
// Location
// Gender
//
// The lowercase of these values is:
// name
// title
// age
// location
// gender
if (firstInput.ToLower() == "action")? I mean it appears a super simple and duplicate question from what you post, and code examples are always goodStringComparison.InvariantCultureIgnoreCase.