dotnet / dotnet/vblang

[Proposal] Auto Properties with private setters

Open
#508 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

[Proposal] Auto Properties with private setters
This C# code
```C#
public string Name { get; private set; }
```

corresponds to all this VB code:
```VB.NET
Dim _name As String
Public Property Name As String
Get
Return _name
End Get

Private Set(value As String)
_name = value
End Set
End Property
```

I suggest to use an attribute like this:
```VB.NET
Public Property Name As String
Public Property Age As Integer
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.