dotnet / dotnet/dotnet-api-docs

Winforms - Control.ResetBindings() summary seems incorrect?

Offen
#2,016 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area-WinForms help wanted Pri2 Pri3
Vorherrschende Sprache
C#
Sterne
949
Forks
1.7k
Ø Merge
3 T. 27 Min.
Gemergte PRs (30 T.)
49

Beschreibung

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_))

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.