This question is locked. New answers and comments are not allowed.
Hello,
The code converter does not convert anonymous types well from C# to VB. Consider this:
var types = new[]
{
new A { Key= 1, Name = 2 },
new A { Key= 1, Name = 2 },
new A { Key= 1, Name = 2 }
}
Does VB have an anonymous collection feature? I don't think it does, so I always convert to:
Dim types As New List<A>()
types.Add(New A With { .Key = 1, .Name = 2});
.
.
But your code converter just does:
new A()
new A()
Something like that... I was hoping it would at least convert \
new A { Key= 1, Name = 2 },
to
New A With { .Key = 1, .Name = 2}
I understand if it doesn't create a list, but if it could convert the anonymous types correctly, that would help a lot.
Thanks.
The code converter does not convert anonymous types well from C# to VB. Consider this:
var types = new[]
{
new A { Key= 1, Name = 2 },
new A { Key= 1, Name = 2 },
new A { Key= 1, Name = 2 }
}
Does VB have an anonymous collection feature? I don't think it does, so I always convert to:
Dim types As New List<A>()
types.Add(New A With { .Key = 1, .Name = 2});
.
.
But your code converter just does:
new A()
new A()
Something like that... I was hoping it would at least convert \
new A { Key= 1, Name = 2 },
to
New A With { .Key = 1, .Name = 2}
I understand if it doesn't create a list, but if it could convert the anonymous types correctly, that would help a lot.
Thanks.