-
Notifications
You must be signed in to change notification settings - Fork 731
Closed
Labels
Description
When calling Formatter.ToString(object) on a jagged array such as
new int[][]
{
new[] { 1, 2 },
new[] { 3, 4 }
};the output contains the nested structure as expected.
{{1, 2}, {3, 4}}
Calling Formatter.ToString(object) on a multidimensional array such as
new int[,]
{
{ 1, 2 },
{ 3, 4 }
};gives an unexpected (and perhaps confusing) visual result, as it doesn't contain the nested structure.
{1, 2, 3, 4}
This could probably be improved by introducing a new MultidimensionalArrayFormatter which checks if the object is an Array and has Rank >= 2.
dennisdoomen