mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-21 01:18:02 +02:00
Multi-dimensional sized array name printing fix
This commit is contained in:
parent
88121831e2
commit
ad7ef19004
2 changed files with 45 additions and 11 deletions
|
@ -1156,10 +1156,29 @@ namespace System.Reflection
|
|||
|
||||
public override void GetFullName(String strBuffer)
|
||||
{
|
||||
UnderlyingType.GetFullName(strBuffer);
|
||||
strBuffer.Append("[");
|
||||
mElementCount.ToString(strBuffer);
|
||||
strBuffer.Append("]");
|
||||
List<int> sizes = scope .(4);
|
||||
|
||||
Type checkType = this;
|
||||
while (true)
|
||||
{
|
||||
if (var arrayType = checkType as SizedArrayType)
|
||||
{
|
||||
sizes.Add(arrayType.mElementCount);
|
||||
checkType = arrayType.UnderlyingType;
|
||||
continue;
|
||||
}
|
||||
|
||||
checkType.GetFullName(strBuffer);
|
||||
break;
|
||||
}
|
||||
|
||||
for (var size in sizes)
|
||||
{
|
||||
if (size == -1)
|
||||
strBuffer.Append("[?]");
|
||||
else
|
||||
strBuffer.AppendF($"[{size}]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue