Skip to content

Commit

Permalink
Fix calculation of array rank in TypeExtensionMethods
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
X39 committed May 12, 2024
1 parent 412e3b5 commit 858f5a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion X39.Util/TypeExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 858f5a0

Please sign in to comment.