paul1956 / CSharpToVB

New version of CSharpToVB converter
MIT License
25 stars 9 forks source link

Enclose New with [] #43

Closed VBAndCs closed 4 years ago

VBAndCs commented 4 years ago

C#:

var x = Expression.New(constructor, parameter1, parameter2);

VB:

Private x = Expression.New(constructor, parameter1, parameter2)

Vb realizes the .New as a call to the constructor. Use .[New] as C# means to call a method named New. This differs than using base in C# that translates to a call to the MyBase.New . The result should be: VB:

Private x = Expression.[New](constructor, parameter1, parameter2)
paul1956 commented 4 years ago

Fixed in 4.2.11.0