C#C
C#4y ago
20 replies
Sebastian

✅ string.Join returns System.Int32[]

In my constructor I am getting
T desiredValue
.
In this case
T
is
int[]
.
When debugging the below code:
string desiredValue;
if (typeof(T) == typeof(int[]))
{
    format = "{0} = [{1}]\n";
    desiredValue = string.Join(", ", this.desiredValue);
}

I end up getting
System.Int32[]
any idea why?
image.png
Was this page helpful?