Output: Display Nullable<T> as T?

This commit is contained in:
Katy Coe
2019-11-05 18:58:04 +01:00
parent 5ff46d3fd3
commit 8571d6d6f3

View File

@@ -49,6 +49,8 @@ namespace Il2CppInspector.Reflection {
var g = (GenericTypeParameters != null ? "<" + string.Join(", ", GenericTypeParameters.Select(x => x.CSharpName)) + ">" : "");
g = (GenericTypeArguments != null ? "<" + string.Join(", ", GenericTypeArguments.Select(x => x.CSharpName)) + ">" : g);
n += g;
if (s == "System.Nullable`1" && GenericTypeArguments.Any())
n = GenericTypeArguments[0].CSharpName + "?";
if (HasElementType)
n = ElementType.CSharpName;
return n + (IsArray ? "[" + new string(',', GetArrayRank() - 1) + "]" : "") + (IsPointer ? "*" : "");