Skip to content

VB -> C#: Xor operator overload CONVERSION ERROR #1182

@zulf346713

Description

@zulf346713

VB.Net input code

Public Shared Operator Xor(left As MyType, right As MyType) As MyType
    Throw New Global.System.NotSupportedException("Not supported")
End Operator

Erroneous output

Cannot convert OperatorBlockSyntax, CONVERSION ERROR: Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.LiteralExpressionSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.MemberDeclarationSyntax'. in '...' at character ...
           at ICSharpCode.CodeConverter.CSharp.CommentConvertingVisitorWrapper.<ConvertHandledAsync>d__12`1.MoveNext()

Expected output

public static MyType operator ^(MyType left, MyType right)
{
    throw new NotSupportedException("Not supported");
}

Details

  • Product in use: VS extension
  • Version in use: 9.2.7.0

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