CodeConverter icon indicating copy to clipboard operation
CodeConverter copied to clipboard

VB -> C# Default namespace duplicated

Open ezin82 opened this issue 7 years ago • 2 comments

"VB -> C#: " I have created a sample project in VB.NET with default namespace VbLibrary.

Input code

Namespace A.B
    Public Class Class1
    End Class
End Namespace

Erroneous output

namespace VbLibrary
{
    namespace VbLibrary.A.B
    {
        public class Class1
        {
        }
    }
}

Expected output

namespace VbLibrary.A.B
{
    public class Class1
    {
    }
}

Details

Product in use: VS extension

Version in use: 6.8.0

If namespaces are nested It works correctly

Input code

Namespace A
    Namespace B
        Public Class Class1
        End Class
    End Namespace
End Namespace

Output code

namespace VbLibrary
{
    namespace A
    {
        namespace B
        {
            public class Class1
            {
            }
        }
    }
}

ezin82 avatar Jun 03 '19 09:06 ezin82

Thanks for the report, reopening #201 since it has the history of this issue

GrahamTheCoder avatar Jun 03 '19 18:06 GrahamTheCoder

If you're interested in fixing it, it should be reasonably easy with that context, otherwise I'll hopefully get around to it in the next month or two

GrahamTheCoder avatar Jun 03 '19 18:06 GrahamTheCoder