Skip to content

VB -> C#: Enum Values as Integer #1212

@wfrx

Description

@wfrx

VB.Net input code

Col("foo") = MyEnum.Value1

Erroneous output

Col("foo") == (MyType)MyEnum.Value1

Expected output

Col("foo") == (MyType)(int)MyEnum.Value1

Details

  • Product in use: codeconv 10.0

VB.NET implicitly uses the Integer Values of Enums, while C# does not.
Like in #1211 I'm not sure if this is something the converter should handle or another case for a custom step for our codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    VB -> C#Specific to VB -> C# conversion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions