This is a migrated thread and some comments may be shown as answers.

c# collection initializer doesn't convert to vb correctly

0 Answers 46 Views
Code Converter
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mhano Harkness
Top achievements
Rank 1
Mhano Harkness asked on 12 Mar 2013, 02:05 AM
It should use the "From" keyword instead of the "With".

Cheers,
Mhano

new List<a>{
        new a{b="w",c="x"},
        new a{b="y",c="z"},
        }

Gives:

New List(Of a)() With { _
New a() With { _
.b = "w", _
.c = "x" _
}, _
New a() With { _
.b = "y", _
.c = "z" _
} _
}

Instead of:

New List(Of a)() From { _ ...
Tags
Code Converter
Asked by
Mhano Harkness
Top achievements
Rank 1
Share this question
or