dotnet / dotnet/dotnet-api-docs

Winforms - Control.ResetBindings() summary seems incorrect?

Open
#2,016 2 comments 0 reactions 0 assignees View on GitHub
area-WinForms help wanted Pri2 Pri3
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

Right now the xml summary for `Control.ResetBindings` reads:

```csharp
Causes a control bound to the to reread all the items in the list and refresh their displayed values.
```

[Docs](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control.resetbindings?view=netframework-4.7.2#System_Windows_Forms_Control_ResetBindings) - [Control.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Windows.Forms/Control.xml)

The implementation clears all the bindings though:

```csharp
public void ResetBindings() {
ControlBindingsCollection bindings = (ControlBindingsCollection)Properties.GetObject(PropBindings);
if (bindings != null) {
bindings.Clear();
}
}
```

[Source](https://github.com/dotnet/winforms/blob/432926c306dcb5bd61d6a3299a647c02b5f51ffa/src/System.Windows.Forms/src/System/Windows/Forms/Control.cs#L1222)

I think perhaps this summary was copied from `BindingSource`? ([Docs](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.bindingsource.resetbindings?view=netframework-4.7.2#System_Windows_Forms_BindingSource_ResetBindings_System_Boolean_))

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.