From 9c9a3cec1c2dcc3888990336837bd22e55b5deab Mon Sep 17 00:00:00 2001 From: "Andy De George (from Dev Box)" Date: Mon, 24 Aug 2026 15:45:16 -0700 Subject: [PATCH] Generalize description to prevent misleading reader --- .../language-reference/compiler-messages/cs0465.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/csharp/language-reference/compiler-messages/cs0465.md b/docs/csharp/language-reference/compiler-messages/cs0465.md index b45a70ac4142c..e25efb7ad6fbb 100644 --- a/docs/csharp/language-reference/compiler-messages/cs0465.md +++ b/docs/csharp/language-reference/compiler-messages/cs0465.md @@ -1,7 +1,8 @@ --- description: "Compiler Warning (level 1) CS0465" title: "Compiler Warning (level 1) CS0465" -ms.date: 07/20/2015 +ms.date: 08/24/2026 +ai-usage: ai-assisted f1_keywords: - "CS0465" helpviewer_keywords: @@ -12,13 +13,13 @@ ms.assetid: 3d36faae-147f-4173-b164-af953fd86eea Introducing a 'Finalize' method can interfere with destructor invocation. Did you intend to declare a destructor? - This warning occurs when you create a class with a method whose signature is `public virtual void Finalize`. +The compiler issues this warning when you declare a method with the signature `void Finalize()`. - If such a class is used as a base class and if the deriving class defines a finalizer, the finalizer will override the base class `Finalize` method, not . +A method named `Finalize` can interfere with finalizer invocation. To define a finalizer, declare `~TypeName()` instead of a `Finalize` method. For more information, see [Finalizers](../../programming-guide/classes-and-structs/finalizers.md). ## Example - The following sample generates CS0465. +The following sample generates CS0465. ```csharp // CS0465.cs