The destructor implicitly calls Finalize on the base class of the object Therefore, the destructor code is implicitly translated to the following code protected override void Finalize try / cleanup statements finall base.Finalize()
• The destructor implicitly calls Finalize on the base class of the object. Therefore, the destructor code is implicitly translated to the following code:
Supports comparisons between objects lblic static bool Equals(object objA, Object objB) iblis static bool ReferenceEquals(object objA, Object objB) public virtual be uals(ObJect obJ)j Determines whether the specified Object instances are the same instance
Supports comparisons between objects Determines whether the specified Object instances are the same instance
The equals(Object) method The current instance is a reference type: Tests for reference equality The cur Equivalent to a call to the ReferenceEquals Thet Thevmethod
The Equals(Object) method • The current instance is a reference type: Tests for reference equality • The current instance is a value type: • The two objects are of the same type • The values of the public and private fields of the two objects are equal Equivalent to a call to the ReferenceEquals method
The static Equals(Object, Object) method IF The two objects represent the same object reference or both are null, it returns true If Either obja or objB is null, it returns false If the two objects do not represent the same object reference and neither is null, it calls objA. Equals objB) if obja overrides the Object Equals(Object) method this override is called
The static Equals(Object, Object) method • IF The two objects represent the same object reference, or both are null, it returns True. • If Either objA or objB is null, it returns false. • If the two objects do not represent the same object reference and neither is null, it calls objA.Equals(objB) if objA overrides the Object. Equals(Object) method, this override is called
a CSharp Blank Window 日X