Repository: dotnet/runtime
File: src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs (C#)

Code before:
                    builder.Append(" (INDIRECT_PINVOKE_TARGET)");
                    break;

                case ReadyToRunFixupKind.PInvokeTarget:
                    ParseMethod(builder);
                    builder.Append(" (PINVOKE_TARGET)");
                    break;

                case ReadyToRunFixupKind.Check_IL_Body:
                case ReadyToRunFixupKind.Verify_IL_Body:
                    uint ilBodyByteBlobSize = ReadUInt();
                    SkipBytes(ilBodyByteBlobSize);
                    uint types = ReadUInt();
                    for (uint i = 0; i < types; i++)
                        ParseType();
                    ParseMethod(builder);
                    if (fixupType == ReadyToRunFixupKind.Check_IL_Body)
                        builder.Append(" (CHECK_IL_BODY)");
                    else
                        builder.Append(" (VERIFY_IL_BODY)");
                    break;

                case ReadyToRunFixupKind.ContinuationLayout:
                    var typeBuilder = new StringBuilder();
                    ParseType(typeBuilder);
                    builder.Append($"{typeBuilder.ToString()}");
                    ReadyToRunTypeLayoutFlags layoutFlags2 = (ReadyToRunTypeLayoutFlags)ReadUInt();
                    builder.Append($" Flags {layoutFlags2}");
                    int actualSize2 = (int)ReadUInt();
                    builder.Append($" Size {actualSize2}");

                    if(layoutFlags2.HasFlag(ReadyToRunTypeLayoutFlags.READYTORUN_LAYOUT_HFA))
                    {
                        throw new BadImageFormatException("ContinuationLayout fixup should not have READYTORUN_LAYOUT_HFA flag set");
                    }

                    if (layoutFlags2.HasFlag(ReadyToRunTypeLayoutFlags.READYTORUN_LAYOUT_Alignment)
                        && !layoutFlags2.HasFlag(ReadyToRunTypeLayoutFlags.READYTORUN_LAYOUT_Alignment_Native))
                    {
                        throw new BadImageFormatException("ContinuationLayout fixup should not have non-native alignment");
                    }

                    if (!layoutFlags2.HasFlag(ReadyToRunTypeLayoutFlags.READYTORUN_LAYOUT_GCLayout))
                    {
                        throw new BadImageFormatException("ContinuationLayout fixup should have GCLayout");
                    }

                    if (!layoutFlags2.HasFlag(ReadyToRunTypeLayoutFlags.READYTORUN_LAYOUT_GCLayout_Empty))
                    {
                        int cbGCRefMap = (actualSize2 / _contextReader.TargetPointerSize + 7) / 8;
                        builder.Append(" GCLayout 0x");

Review comment (suggestion):
Unnecessary call to ToString(). The interpolated string will automatically call ToString() on the StringBuilder, so this explicit call is redundant.
```suggestion
                    builder.Append(typeBuilder);
```

Code after:
            return result;
        }

        /// <summary>
        /// Decode a type from the signature stream.
        /// </summary>
        /// <param name="builder"></param>
        private void ParseType(StringBuilder builder)
        {
            builder.Append(base.ParseType());
        }

        public IAssemblyMetadata GetMetadataReaderFromModuleOverride()
        {
            if (PeekElementType() == CorElementType.ELEMENT_TYPE_MODULE_ZAPSIG)
            {
                var currentOffset = Offset;

                ReadElementType();
                int moduleIndex = (int)ReadUInt();
                IAssemblyMetadata refAsmReader = _contextReader.OpenReferenceAssembly(moduleIndex);

                UpdateOffset(currentOffset);

                return refAsmReader;
            }
            return null;
        }

        /// <summary>
        /// Parse an arbitrary method signature.
        /// </summary>
        /// <param name="builder">Output string builder to receive the textual signature representation</param>
        private void ParseMethod(StringBuilder builder)
        {
            builder.Append(ParseMethod());
        }

        private void ParseTypeLayout(StringBuilder builder)
        {
            ReadyToRunTypeLayoutFlags layoutFlags = (ReadyToRunTypeLayoutFlags)ReadUInt();
            builder.Append($" Flags {layoutFlags}");
            int actualSize = (int)ReadUInt();
            builder.Append($" Size {actualSize}");

            if (layoutFlags.HasFlag(ReadyToRunTypeLayoutFlags.READYTORUN_LAYOUT_HFA))
            {
                builder.Append($" HFAType {ReadUInt()}");
            }

            if (layoutFlags.HasFlag(ReadyToRunTypeLayoutFlags.READYTORUN_LAYOUT_Alignment))