New Feature, VisualBasic With Keyword Syntax for property mapping
- Dominant language
- No language data
- Stars
- 328
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
Hi, currently, if we want to get or set property value to another object, 7 lines of code must be used,
Current:
```vbnet
Dim _value As
Public Property Value As String
Get
Return _value.Label
End Get
Set
_value.Label = value
End Set
```
This is not so convenient and not a brief code, and I think this situation can be simplify with the VisualBasic ``With`` keyword
```vbnet
Dim _value As
' maps both get and set
Public Property Value As String With _value.Label
' maps readonly
Public ReadOnly Property Value2 As String With _value.Label
' maps writeonly
Public WriteOnly Property Value3 As String With _value.Label
```
Or with two lines of code syntax
```vbnet
Dim _value As
' maps both get and set
Public Property Value As String
With _value.Label
' maps readonly
Public ReadOnly Property Value2 As String
With _value.Label
' maps writeonly
Public WriteOnly Property Value3 As String
With _value.Label
```
Which it means the ``Value`` property its value was mapped to the property of another object ``_value.Label``, this will makes the code more beautiful and briefly.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.