From 027dde8358139c2983f446d99621947000938020 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Mon, 24 Feb 2020 12:28:38 +0100 Subject: [PATCH] C#: Replace "in, out" with "[In, Out]" (CS8328) --- Il2CppInspector.Common/Reflection/ParameterInfo.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Il2CppInspector.Common/Reflection/ParameterInfo.cs b/Il2CppInspector.Common/Reflection/ParameterInfo.cs index e4caf51..8fcde75 100644 --- a/Il2CppInspector.Common/Reflection/ParameterInfo.cs +++ b/Il2CppInspector.Common/Reflection/ParameterInfo.cs @@ -112,8 +112,9 @@ namespace Il2CppInspector.Reflection // ref will be handled as part of the type name public string GetModifierString() => - (IsIn ? "in " : "") - + (IsOut ? "out " : "") + (IsIn && !IsOut ? "in " : "") + + (IsOut && !IsIn ? "out " : "") + + (IsIn && IsOut ? "[In, Out] " : "") + (!IsIn && !IsOut && ParameterType.IsByRef ? "ref " : ""); private string getCSharpSignatureString(Scope scope) => $"{GetModifierString()}{ParameterType.GetScopedCSharpName(scope, omitRef: true)}";