Skip to content

VB -> C#: wrong result for empty char comparisation #892

@KunzeAndreas

Description

@KunzeAndreas

VB.Net input code

Dim testChar As Char = Nothing
Dim testResult = testChar = ""
Assert.That(testResult, "comparing null character with empty string should be true")

Erroneous output

bool testResult = Conversions.ToString(testChar) == "";    

Expected output

bool testResult = testChar == char.MinValue;

Details

  • Product in use: VS extension
  • Version in use: 9.0.0.0
  • Did you see it working in a previous version, which? no

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good for coding agentCoding agent might get it in one - small change with reproVB -> C#Specific to VB -> C# conversionoutput logic errorA bug where the converted output behaves differently to the input code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions