diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.vb index 6653f751..1e22cf70 100644 --- a/Tests/TestData/MultiFileCharacterization/SourceFiles/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.vb +++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.vb @@ -13,10 +13,15 @@ Dim lst As CSharpRefReturn.RefReturnList(Of SomeStruct) Dim s As String - 'With lst(0) - ' .P = s - ' s = .P - 'End With + With lst(0) + .P = s + s = .P + End With + + With lst.RefProperty + .P = s + s = .P + End With End Sub Structure SomeStruct diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.cs index 45caf235..64b3cd19 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.cs @@ -17,13 +17,20 @@ public void UseArr() public void UseRefReturn() { - CSharpRefReturn.RefReturnList lst; - string s; + var lst = default(CSharpRefReturn.RefReturnList); + var s = default(string); + + { + ref var withBlock = ref lst[0]; + withBlock.P = s; + s = withBlock.P; + } - // With lst(0) - // .P = s - // s = .P - // End With + { + ref var withBlock1 = ref lst.RefProperty; + withBlock1.P = s; + s = withBlock1.P; + } } public struct SomeStruct