1
Reply

string - case insensitive

Violeta Popa

Violeta Popa

Apr 10 2013 4:08 PM
935
Hello :) I want to check is a text starts with "RO". I have this code:

if (cod.StartsWith("RO") || cod.StartsWith("ro")||cod.StartsWith("Ro")cod.StartsWith("rO"))

Is there a way to mention "RO" to be case insensitive to avoid the cod to be too long?

Answers (1)