I am not sure if this is the same in .net as java but I thought it might help 
so I thought I would put it out for the compare text question.  using the == 
operator to compare the values of primitive variables and determine if they are 
equal. If object reference variables are compared using the == operator, it 
returns true only if the reference variables are referring to the same object. 

Object classes provide equals(Object obj) methods, which can be overridden to 
return true for logically equal objects. The default implementation of the 
equals() method in the Object class returns true only if an object is compared 
to itself.  Classes like String and Boolean have overridden the equals() 
method, while StringBuffer has not.

-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED]
Sent: Friday, October 14, 2005 3:00 PM
To: [email protected]
Subject: Re: [AspNetAnyQuestionIsOk] What's best way to compare text


where do you get the figure 6 vs. 2? What is your basis for these numbers?

Did you read
http://dotnetjunkies.com/WebLog/chris.taylor/archive/2004/05/18/13927.aspx
at all? It talks about the performance considerations which is generally
what people are asking about, the raw speed of the operation.

On 10/14/05, Arindam <[EMAIL PROTECTED]> wrote:
>
>  Very simple
>
> string.Compare(str1,str2) // 6 overloads
>
> string.Equals(str1,str2) // 2 overloads
>
>
> Charles Carroll <[EMAIL PROTECTED]> wrote:
> http://dotnetjunkies.com/WebLog/chris.taylor/archive/2004/05/18/13927.aspx
> has some good data on the subject for 1.1
>
> On 10/13/05, Jim Brinkman wrote:
> >
> > Here's my code that a co worker suggested I change to use the
> > string.Equals() method to compare instead.
>


[Non-text portions of this message have been removed]




 
Yahoo! Groups Links



 






*************************************************************************
This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to