From 430d49bd4d4674b517be22679e1de84c56247880 Mon Sep 17 00:00:00 2001 From: Timur Kelman Date: Fri, 26 Jul 2024 11:49:08 +0200 Subject: [PATCH] fix a bug --- CodeConverter/CSharp/HoistedFieldFromVbStaticVariable.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeConverter/CSharp/HoistedFieldFromVbStaticVariable.cs b/CodeConverter/CSharp/HoistedFieldFromVbStaticVariable.cs index 62813e64..959c7c51 100644 --- a/CodeConverter/CSharp/HoistedFieldFromVbStaticVariable.cs +++ b/CodeConverter/CSharp/HoistedFieldFromVbStaticVariable.cs @@ -22,5 +22,5 @@ public HoistedFieldFromVbStaticVariable(string originalMethodName, string origin } public string FieldName => OriginalMethodName != null ? $"_{OriginalMethodName}_{OriginalVariableName}" : $"_{OriginalVariableName}"; - public string PrefixedOriginalVariableName => PerScopeState.GetPrefixedName(OriginalParentAccessorKind.ToString(), OriginalVariableName); + public string PrefixedOriginalVariableName => PerScopeState.GetPrefixedName(OriginalParentAccessorKind == MethodKind.Ordinary ? "" : OriginalParentAccessorKind.ToString(), OriginalVariableName); } \ No newline at end of file