Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

VB -> C#: Conversions.ToInteger called when casting integral types to enums #861

Closed
Yozer opened this issue Apr 3, 2022 · 0 comments · Fixed by #862
Closed

VB -> C#: Conversions.ToInteger called when casting integral types to enums #861

Yozer opened this issue Apr 3, 2022 · 0 comments · Fixed by #862
Assignees
Labels
enhancement VB -> C# Specific to VB -> C# conversion

Comments

@Yozer
Copy link
Member

Yozer commented Apr 3, 2022

VB.Net input code

Dim res = CType(5, TestEnum)

Erroneous output

var res = (TestEnum)Conversions.ToInteger(5);

Expected output

var res = (TestEnum)5;

Details

  • Product in use: e.g. codeconverter.icsharpcode.net / VS extension / both
  • Version in use: e.g. 5.6.3 or a commit hash 69a16a7
  • Did you see it working in a previous version, which?
  • Any other relevant information to the issue, or your interest in contributing a fix.
@Yozer Yozer added enhancement VB -> C# Specific to VB -> C# conversion labels Apr 3, 2022
@Yozer Yozer self-assigned this Apr 3, 2022
@Yozer Yozer linked a pull request Apr 3, 2022 that will close this issue
@Yozer Yozer closed this as completed Apr 3, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement VB -> C# Specific to VB -> C# conversion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant