From 8771ec14a660fb3a831ae78230daa0b1b1f02465 Mon Sep 17 00:00:00 2001 From: Haidar Mehsen <49842031+Haidar0096@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:57:58 +0300 Subject: [PATCH 1/2] Update interfaces.md (#42657) This commit makes it more clear the implementing class of the `IEquatable` method must be of type `T ` in order to be able to determine if its equal to other instances of type `T`. Confusion might arise in certain case. For example, if we have a class of type `MyClass` that implements `IEquatable`, then we can't use `IEquatable`'s method `Equals` to compare an instance of `MyClass` with another instance of `MyClass` --- docs/csharp/fundamentals/types/interfaces.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/fundamentals/types/interfaces.md b/docs/csharp/fundamentals/types/interfaces.md index 0b937053a1d97..64a6d423717f3 100644 --- a/docs/csharp/fundamentals/types/interfaces.md +++ b/docs/csharp/fundamentals/types/interfaces.md @@ -18,7 +18,7 @@ You define an interface by using the [`interface`](../../language-reference/keyw The name of an interface must be a valid C# [identifier name](../coding-style/identifier-names.md). By convention, interface names begin with a capital `I`. -Any class or struct that implements the interface must contain a definition for an method that matches the signature that the interface specifies. As a result, you can count on a class that implements `IEquatable` to contain an `Equals` method with which an instance of the class can determine whether it's equal to another instance of the same class. +Any class or struct that implements the interface must contain a definition for an method that matches the signature that the interface specifies. As a result, you can count on a class of type `T` that implements `IEquatable` to contain an `Equals` method with which an instance of this class can determine whether it's equal to another instance of the same class. The definition of `IEquatable` doesn't provide an implementation for `Equals`. A class or struct can implement multiple interfaces, but a class can only inherit from a single class. From bd6965b02ee1f40470a2ffd159d06ae6922c2bf6 Mon Sep 17 00:00:00 2001 From: Noah Falk Date: Thu, 19 Sep 2024 13:30:37 -0700 Subject: [PATCH 2/2] Document CorHandleWeakWinRT (#42659) - Add docs for that enumeration value in the .NET debugging APIs. - Also updates the CorReferenceFinalizer value. 80000002 in decimal is the correct value in the shipping code. Probably some earlier developer intended it to be hexadecimal in the product but made a mistake. Since it has already shipped it won't be changed. Fixes https://github.com/dotnet/diagnostics/issues/4171 --- .../unmanaged-api/debugging/corgcreferencetype-enumeration.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/framework/unmanaged-api/debugging/corgcreferencetype-enumeration.md b/docs/framework/unmanaged-api/debugging/corgcreferencetype-enumeration.md index a08d9c2baf911..c632ccc4cd5d0 100644 --- a/docs/framework/unmanaged-api/debugging/corgcreferencetype-enumeration.md +++ b/docs/framework/unmanaged-api/debugging/corgcreferencetype-enumeration.md @@ -32,9 +32,10 @@ typedef enum { CorHandleStrongDependent = 64, CorHandleStrongAsyncPinned = 128, CorHandleStrongSizedByref = 256, + CorHandleWeakWinRT = 512, CorReferenceStack = 0x80000001, - CorReferenceFinalizer = 0x80000002, + CorReferenceFinalizer = 80000002, // Note the constant is decimal, not hexadecimal CorHandleStrongOnly = 0x1E3, CorHandleWeakOnly = 0xC, @@ -54,6 +55,7 @@ typedef enum { |`CorHandleStrongDependent`|A handle to a dependent object from the object handle table.| |`CorHandleStrongAsyncPinned`|An asynchronous pinned object from the object handle table.| |`CorHandleStrongSizedByref`|A strong handle that keeps an approximate size of the collective closure of all objects and object roots at garbage collection time.| +|`CorHandleWeakWinRT`|A weak handle to a RCW (Runtime Callable Wrapper). An RCW is a managed object that proxies calls to an underlying COM object.| |`CorReferenceStack`|A reference from the managed stack.| |`CorReferenceFinalizer`|A reference from the finalizer queue.| |CorHandleStrongOnly|Return only strong references from the handle table. This value is used by the [ICorDebugProcess5::EnumerateHandles](icordebugprocess5-enumeratehandles-method.md) method only.|