diff --git a/src/Microsoft.Cci.Extensions/Writers/CSharp/CSDeclarationWriter.Types.cs b/src/Microsoft.Cci.Extensions/Writers/CSharp/CSDeclarationWriter.Types.cs index b21bd2d92d1..b3afa997c15 100644 --- a/src/Microsoft.Cci.Extensions/Writers/CSharp/CSDeclarationWriter.Types.cs +++ b/src/Microsoft.Cci.Extensions/Writers/CSharp/CSDeclarationWriter.Types.cs @@ -25,8 +25,7 @@ public void WriteTypeDeclaration(ITypeDefinition type) // But we need also consider if this attribute is filtered out or not but I guess // we have the same problem with all the fake attributes at this point. - if (type.IsClass && type.Layout != LayoutKind.Auto || - type.IsStruct && (type.Layout != LayoutKind.Sequential || type.Alignment != 0 || type.SizeOf != 0 || type.StringFormat != StringFormatKind.Ansi)) + if ((type.IsStruct || type.IsClass) && type.Layout != LayoutKind.Auto) { FakeCustomAttribute structLayout = new FakeCustomAttribute("System.Runtime.InteropServices", "StructLayoutAttribute"); string layoutKind = string.Format("System.Runtime.InteropServices.LayoutKind.{0}", type.Layout.ToString());