dotnet / dotnet/vblang

Use + for multicast delegates

Open
#317 3 comments 1 reaction 0 assignees View on GitHub
LDM Reviewed: No plans
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

I have this delegate:
```Delegate Sub MsgSub(ByVal Msg As String)```

suppose I have two subs Show1 and show2, then I can do:
```
Dim M As MsgSub = [Delegate].Combine(New MsgSub(AddressOf Show1),
New MsgSub(AddressOf Show2))
```

In C# this can be done by using + operator directly, so why can't VB.NET allow this:

```
Dim M As MsgSub = New MsgSub(AddressOf Show1)+ New MsgSub(AddressOf Show2)
```

Furthermore, I want to do this directly:
```
Dim M As MsgSub = AddressOf Show1 + AddressOf Show2
```

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.