Tangara G

Tangara G

  • 1.7k
  • 298
  • 63.1k

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

Sep 11 2020 7:49 AM
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 ?

Brought to you by:

Answers (15)