From 776381343b80ded38cf60910a33c315654f5af47 Mon Sep 17 00:00:00 2001 From: Jb Evain Date: Fri, 20 Jan 2012 14:54:28 +0100 Subject: [PATCH] Fix detection of mcs generated anonymous type --- ICSharpCode.Decompiler/CecilExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/CecilExtensions.cs b/ICSharpCode.Decompiler/CecilExtensions.cs index 2c2198c46..c3fc9c0d5 100644 --- a/ICSharpCode.Decompiler/CecilExtensions.cs +++ b/ICSharpCode.Decompiler/CecilExtensions.cs @@ -220,7 +220,7 @@ namespace ICSharpCode.Decompiler { if (type == null) return false; - if (string.IsNullOrEmpty(type.Namespace) && type.HasGeneratedName() && type.Name.Contains("Anon")) { + if (string.IsNullOrEmpty(type.Namespace) && type.HasGeneratedName() && (type.Name.Contains("AnonType") || type.Name.Contains("AnonymousType"))) { TypeDefinition td = type.Resolve(); return td != null && td.IsCompilerGenerated(); }