Expression-bodied members and blocks
- Dominant language
- No language data
- Stars
- 328
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
I think VB.NET can make use of C# => symbol to write Expression-bodied subs, functions, properties and even blocks. There should be implicit line continuation around the => symbol.
```
Sub Sub1() => MsgBox("Test")
Function Func1(X as integer) As Integer => 2 * X
Dim x as integer
Property Prop2() As Integer
Get => x
Set => x = Value/2
End Property
' or in short:
Property Prop1( ) As Integer <=> x
Property Prop2() As Integer => 100 ' This is a read-only property
Property Prop3() As Integer <= 100 ' This is a write-only property
```
And in blocks:
```For I = 0 To 10 => Console.WriteLine(I)```
```
Function Test(N as Integer) =>
For I = 0 To N => Console.WriteLine(I)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.