-
Notifications
You must be signed in to change notification settings - Fork 238
VB -> C#: Collection Initializers/Collection Expressions #1211
Open
Description
VB.Net input code
Public Sub MyMethod(params As Key()) MyMethod({ "foo", "bar", "baz" })
Erroneous output
MyMethod(new[] { "foo", "bar", "baz" })
Expected output
MyMethod(new Key[] { "foo", "bar", "baz" }) //or MyMethod(["foo", "bar", "baz"])
Details
- Product in use: codeconv 10.0
It probably has to do with our own Key Class that C# then interprets as strings.
Collections of other classes (e.g. Integers, other more complex classes) work fine with new[] { 1, 2, 3 }
I don't know if this is something the converter should (could) be able to handle, as it looks like a problem particular to our codebase.
If not, it's a candidate for custom pre/post-processing we need to implement ourselves.
Metadata
Metadata
Assignees
Type
Fields
Give feedbackNo fields configured for issues without a type.