-
July 27th, 2004, 10:56 AM
#1
What is the difference between == and Equals?
Any ideas would be appreciated.
-
July 27th, 2004, 11:10 AM
#2
Well.. there isnt any difference actually... its just its relly easy to use == instead of Function.Equals
Thats it!
Regards,
Alexei
-
July 27th, 2004, 02:58 PM
#3
Originally Posted by Alexei Kubarev
Well.. there isnt any difference actually... its just its relly easy to use == instead of Function.Equals
Thats it!
Being smart....
one is an operator and one is a method........
-
July 27th, 2004, 04:08 PM
#4
To expand on what Brad has said :
I believe (and Brad can confirm) the 'Equals' is an overrided function which is used by the operator '==' when necessary.
So one is an operator and the other is a method, but the operator uses the method internally to determine the result.
Darwen.
-
July 28th, 2004, 03:37 AM
#5
Ehh... okej... i admit that it wasnt the smartes answer...
Hehe... But it still works if you write Function.Equals == somevalue..
I think :S not really sure about that... :S
Regards,
Alexei
-
July 28th, 2004, 05:31 AM
#6
Yes I agree that Equals is an overriden function and == operator calls it.
Actually the equals provide general view as equals is defined in object class and the overriding classes provide their own functionality for this function.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|