Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

VB -> C#: multiline interpolated string with just format-blocks doesn't convert correctly (missing @) #1096

Open
jrmoreno1 opened this issue Apr 25, 2024 · 0 comments
Labels
VB -> C# Specific to VB -> C# conversion

Comments

@jrmoreno1
Copy link
Contributor

VB.Net input code

Public Class VisualBasicClass
Sub Test()

Dim v1  = 1
Dim v2 = 2

Dim testStr= $"What's up with {v1}
{v2}"
Console.Writeline(testStr)

End Sub 

End Class

Erroneous output

public partial class VisualBasicClass
{
    public void Test()
    {

        int v1 = 1;
        int v2 = 2;

        string testStr = $"What's up with {v1}
{v2}";
        Console.Writeline(testStr);

    }

}

Expected output

public partial class VisualBasicClass
{
    public void Test()
    {

        int v1 = 1;
        int v2 = 2;

        string testStr = $@"What's up with {v1}
{v2}";
        Console.Writeline(testStr);

    }

}

Details

  • Product in use: both extension and website
  • Version in use: 9.2.5.0
  • Don't know if it was ever working or not.
  • Might be able to contribute a fix
@jrmoreno1 jrmoreno1 added the VB -> C# Specific to VB -> C# conversion label Apr 25, 2024
@GrahamTheCoder GrahamTheCoder changed the title VB -> C#: multiline interpolated string with just format-blocks doesn't convert correctly VB -> C#: multiline interpolated string with just format-blocks doesn't convert correctly (missing @) May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VB -> C# Specific to VB -> C# conversion
Projects
None yet
Development

No branches or pull requests

1 participant