Tangara G

Tangara G

  • NA
  • 298
  • 93.2k

I want a method that tells me the text length is same as Compared text

Sep 11 2020 7:49 AM
Hello,
 
I need help to make sure this method will tell me the comparision is the same in length:
 
Here's what I have :
 
private bool Matched(string Target, string text){
return text.ToLower().Trim().Length.Equals(Target.ToLower().Trim().Length);
}
 
Do correct me if there is a mistake.
 
I'd also like to know if I didn't put in the Length will it affect the evaluation ?

Answers (15)