Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public BindingMemberInfo(string dataMember)
}
}

public string BindingPath => _dataList != null ? _dataList : string.Empty;
public string BindingPath => _dataList ?? string.Empty;

public string BindingField => _dataField != null ? _dataField : string.Empty;
public string BindingField => _dataField ?? string.Empty;

public string BindingMember
{
Expand Down
8 changes: 3 additions & 5 deletions src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2031,8 +2031,7 @@ public int FindString(string s, int startIndex) {

// Always use the managed FindStringInternal instead of CB_FINDSTRING.
// The managed version correctly handles Turkish I.
//
return FindStringInternal(s, Items, startIndex, false);
return FindStringInternal(s, Items, startIndex, exact: false, ignoreCase: true);
}

/// <include file='doc\ComboBox.uex' path='docs/doc[@for="ComboBox.FindStringExact"]/*' />
Expand Down Expand Up @@ -2060,7 +2059,7 @@ public int FindStringExact(string s, int startIndex) {
/// string. The strings must match exactly, except for differences in
/// casing.
/// </devdoc>
internal int FindStringExact(string s, int startIndex, bool ignorecase) {
internal int FindStringExact(string s, int startIndex, bool ignoreCase) {
if (s == null) return -1;

if (itemsCollection == null || itemsCollection.Count == 0) {
Expand All @@ -2074,8 +2073,7 @@ internal int FindStringExact(string s, int startIndex, bool ignorecase) {

// Always use the managed FindStringInternal instead of CB_FINDSTRINGEXACT.
// The managed version correctly handles Turkish I.
//
return FindStringInternal(s, Items, startIndex, true, ignorecase);
return FindStringInternal(s, Items, startIndex, exact: true, ignoreCase);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return FindStringInternal(s, Items, startIndex, exact: true, ignoreCase);
return FindStringInternal(s, Items, startIndex, exact: true, ignoreCase: ignoreCase);

consistancy

}

// GetPreferredSize and SetBoundsCore call this method to allow controls to self impose
Expand Down
5 changes: 2 additions & 3 deletions src/System.Windows.Forms/src/System/Windows/Forms/ListBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ public int FindString(string s, int startIndex) {

// Always use the managed FindStringInternal instead of LB_FINDSTRING.
// The managed version correctly handles Turkish I.
return FindStringInternal(s, Items, startIndex, false);
return FindStringInternal(s, Items, startIndex, exact: false, ignoreCase: true);
}

/// <include file='doc\ListBox.uex' path='docs/doc[@for="ListBox.FindStringExact"]/*' />
Expand Down Expand Up @@ -1428,8 +1428,7 @@ public int FindStringExact(string s, int startIndex) {

// Always use the managed FindStringInternal instead of LB_FINDSTRING.
// The managed version correctly handles Turkish I.
//
return FindStringInternal(s, Items, startIndex, true);
return FindStringInternal(s, Items, startIndex, exact: true, ignoreCase: true);
}

/// <include file='doc\ListBox.uex' path='docs/doc[@for="ListBox.GetItemHeight"]/*' />
Expand Down
Loading