dotnet / dotnet/vscode-csharp

There is no auto-complete for events ( event += )

Open
#4,457 1 comment 0 reactions 0 assignees View on GitHub
OmniSharp Triaged
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

## Environment data
`dotnet --info` output:
Version: 5.0.200

VS Code version:
1.54.3 (system setup)
C# Extension version:
v1.23.9

## Steps to reproduce

create a new C# class and assign it some events, for example:

```csharp
public class Test
{
public delegate void _foo();
public event _foo Foo;
}
```
and then create another class with a main method, create the Test class object and try to subscrive to the event:

```csharp
public class MainClass
{
public Test mytest = new Test();
public void MainMethod()
{
mytest.Foo += // here is where you sould get the AutoCompletion suggestion with the "hint" icon or automatic auto complete when pressing double tab
}
}
```

## Expected behavior

there is actual auto completion suggestion

## Actual behavior

No auto completion at all and you have to create subscription for the event manually.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.