Skip to content

VB -> C#: Parameterized Property optional parameter in wrong place and missing value #642

Description

@ATECoder

Input code

    Protected Property AttributeValue(<Runtime.CompilerServices.CallerMemberName()> Optional ByVal name As String = Nothing) As Double
        GetEnd Get
        Set(value As Double)End Set
    End Property

Erroneous output

        protected double get_AttributeValue([System.Runtime.CompilerServices.CallerMemberName()] string name)
        {.
        }

        protected void set_AttributeValue([System.Runtime.CompilerServices.CallerMemberName()] string name, double value)
        {}

Expected output

        protected double AttributeValueGetter([System.Runtime.CompilerServices.CallerMemberName()] string name = "")
        {}

        protected void AttributeValueSetter(double value, [System.Runtime.CompilerServices.CallerMemberName()] string name = "")
        {.
        }

Details

  • Product in use: codeconverter.icsharpcode.net / VS extension
  • Version in use: 8.1.8
  • Did you see it working in a previous version, which? N/A
  • Any other relevant information to the issue, or your interest in contributing a fix. N/A

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