From 858f5a023b43054b19ba1ce05193eed4b93fdf35 Mon Sep 17 00:00:00 2001 From: Marco Silipo Date: Sun, 12 May 2024 02:08:47 +0200 Subject: [PATCH] Fix calculation of array rank in TypeExtensionMethods This commit modifies the TypeExtensionMethods.cs file from the X39.Util library. Specifically, it fixes the calculation of the array's rank in the IsArray condition by decrementing the result by 1. --- X39.Util/TypeExtensionMethods.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/X39.Util/TypeExtensionMethods.cs b/X39.Util/TypeExtensionMethods.cs index 9c94a87..ca04bc5 100644 --- a/X39.Util/TypeExtensionMethods.cs +++ b/X39.Util/TypeExtensionMethods.cs @@ -210,7 +210,7 @@ public static string FullNameUncached(this Type t) if (t.IsArray) { builder.Append('['); - builder.Append(',', t.GetArrayRank()); + builder.Append(',', t.GetArrayRank() - 1); builder.Append(']'); } return builder.ToString();