C# String Equality: == vs .Equals()

3
1



Subscribe for more content:
Check out our other videos:

In this episode we look at the differences between the equals operator and the equals method when checking equality on null values.

Nguồn:https://wijstaanvooronzegrondrechten.org/

Xem Thêm Bài Viết Khác:https://wijstaanvooronzegrondrechten.org/cong-nghe

3 COMMENTS

  1. string is a reference, okay, but it doesn't pass by reference, it only called reference because it lives in the heap

    also
    == compare by value for all the primitive types and if the type is object it compares by reference ( compare by reference )
    .equal always compare by content (value)

LEAVE A REPLY

Please enter your comment!
Please enter your name here