Inline With statement in Visual Basic

Currently in VB, there is the option to generate a With statement when selecting multiple statments and selecting the appropriate "Surround With" option.

Is there any option/refactoring available to do the reverse of this?

e.g.

Starting from

With value
     .Property1 = a
     .Method2(2, False)
     MyMethod(.Property2)
End With

should produce

value.Property1 = a
value.Method2(2, False)
MyMethod(value.Property2)

Note: This would be great if it also worked with object initializers

Please sign in to leave a comment.