if I do something like this...
String myVar = "in";
if(myVar.ToUpper() == "in")
{
//do something
}
This is not going to go inside "if" block ..right?
or
Is it going to check BOTH for "in" AND "IN" and do whatever is there inside that if? If so, why is that ? Isn't it supposed to skip what's inside of "if" block?
Same confusion is about ToLower()
too
Edit: So to check for both cases, I need to write:
if((myVar.ToUpper().Equals("in"))&&(myVar.Equals("in")))
Like this..right?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…