15
Answers

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

Tangara G

Tangara G

4y
684
1
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)