Skip to content

VB -> C# Parameterized property #200

@vfle

Description

@vfle

Input code

        Public ReadOnly Property FullName(ByVal lastNameFirst As Boolean) As String
            Get
                If lastNameFirst Then
                    Return LastName & " " & FirstName
                Else
                    Return FirstName & " " & LastName
                End If
            End Get
        End Property

Erroneous output

        public string FullName
        {
            get
            {
                if (lastNameFirst)
                    return LastName + " " + FirstName;
                else
                    return FirstName + " " + LastName;
            }
        }

Expected output

        public string  FullName(bool lastNameFirst)
        {
                if (lastNameFirst)
                    return LastName + " " + FirstName;
                else
                    return FirstName + " " + LastName;
        }

Details

Product in use: VS extension

Version in use: 6.1.0.0

Metadata

Metadata

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