String case sensitivity

Just thought I would share something I figured out that might be helpful to some people. So instead of just:

if(input == “menu”)
{

}

You can put:

if (input.Equals(“Menu”, System.StringComparison.CurrentCultureIgnoreCase))
{

}

-it auto finds the syntax on visual studio thank god lol, but it means that regardless of how they type “menu” eg. Menu, meNU, MEnU etc… itll still work.

3 Likes

Thank you for posting this! This will help a lot of people.

You know, I was thinking this yesterday mate. Did you find that script because I wouldn’t have never figured that out :rofl: :rofl: :rofl: :rofl: :rofl:

Privacy & Terms