ToolStripComboBox.FindStringExact Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Finds the item that exactly matches the specified string.
Overloads
FindStringExact(String, Int32) |
Finds the first item after the specified index that exactly matches the specified string. |
FindStringExact(String) |
Finds the first item in the ToolStripComboBox that exactly matches the specified string. |
FindStringExact(String, Int32)
Finds the first item after the specified index that exactly matches the specified string.
public:
int FindStringExact(System::String ^ s, int startIndex);
public int FindStringExact (string s, int startIndex);
public int FindStringExact (string? s, int startIndex);
member this.FindStringExact : string * int -> int
Public Function FindStringExact (s As String, startIndex As Integer) As Integer
Parameters
- startIndex
- Int32
The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control.
Returns
The zero-based index of the first item found; returns -1 if no match is found.
Remarks
The search performed by this method is not case-sensitive. The s
parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text at the specified index, and returns the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text or changing the item's text. Once you have found the specified text, if you want to search for other instances of exact text in the ToolStripComboBox, use this method to specify a starting index within the ToolStripComboBox. If you want to search for a partial match instead of the exact word, use the FindString method.
Applies to
FindStringExact(String)
Finds the first item in the ToolStripComboBox that exactly matches the specified string.
public:
int FindStringExact(System::String ^ s);
public int FindStringExact (string s);
public int FindStringExact (string? s);
member this.FindStringExact : string -> int
Public Function FindStringExact (s As String) As Integer
Parameters
Returns
The zero-based index of the first item found; -1 if no match is found.
Remarks
The search performed by this method is not case-sensitive. The s
parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text at the specified index, and returns the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the ToolStripComboBox, use FindString method to specify a starting index within the ToolStripComboBox. If you want to search for a partial match instead of the exact word, use the FindString method.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기