From 3a8f0db0a1e82f47a85c504850318e11490a6881 Mon Sep 17 00:00:00 2001 From: MikeFH Date: Sat, 20 Mar 2021 10:23:27 +0100 Subject: [PATCH] Adjust fitness calculation for desctructors --- ILSpy/Search/AbstractEntitySearchStrategy.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ILSpy/Search/AbstractEntitySearchStrategy.cs b/ILSpy/Search/AbstractEntitySearchStrategy.cs index 9e711c084..556f3aaee 100644 --- a/ILSpy/Search/AbstractEntitySearchStrategy.cs +++ b/ILSpy/Search/AbstractEntitySearchStrategy.cs @@ -77,9 +77,9 @@ namespace ICSharpCode.ILSpy.Search return 0; } - // Constructors always have the same name in IL: + // Constructors and destructors always have the same name in IL: // Use type name instead - if (text == ".cctor" || text == ".ctor") + if (member.SymbolKind == SymbolKind.Constructor || member.SymbolKind == SymbolKind.Destructor) { text = member.DeclaringType.Name; }