public string ToString(bool recursively) { var sb = new StringBuilder(); sb.AppendLine($"Type layout for '{Type.Name}'"); int emptiness = (Paddings * 100) / Size; sb.AppendLine($"Size: {Size} bytes. Paddings: {Paddings} bytes (%{emptiness} of empty space)"); sb.AppendLine(LayoutPrinter.TypeLayoutAsString(this, recursively: recursively)); return(sb.ToString()); }
public static void PrintLayout(Type type, bool recursively = true) { LayoutPrinter.Print(type, recursively); }
public static void PrintLayout <T>(bool recursively = true) { LayoutPrinter.Print <T>(recursively); }