BindingList.FindCore メソッド
アセンブリ: System (system.dll 内)

Protected Overridable Function FindCore ( _ prop As PropertyDescriptor, _ key As Object _ ) As Integer
Dim prop As PropertyDescriptor Dim key As Object Dim returnValue As Integer returnValue = Me.FindCore(prop, key)
戻り値
プロパティ記述子に一致し、指定した値を格納している項目の 0 から始まるインデックス。


BindingList クラスは検索の基本実装を提供していないため、既定では、FindCore は常に NotSupportedException をスローします。検索を有効にするには、BindingList から派生して、次のタスクを実行します。

FindCore メンバの使用方法を次のコード例に示します。
Public Class MyFontList Inherits BindingList(Of Font) Protected Overrides ReadOnly Property SupportsSearchingCore() As Boolean Get Return True End Get End Property Protected Overrides Function FindCore(ByVal prop As PropertyDescriptor, _ ByVal key As Object) As Integer ' Ignore the prop value and search by family name. Dim i As Integer While i < Count If Items(i).FontFamily.Name.ToLower() = CStr(key).ToLower() Then Return i End If i += 1 End While Return -1 End Function End Class
public class MyFontList : BindingList<Font> { protected override bool SupportsSearchingCore { get { return true; } } protected override int FindCore(PropertyDescriptor prop, object key) { // Ignore the prop value and search by family name. for (int i = 0; i < Count; ++i) { if (Items[i].FontFamily.Name.ToLower() == ((string)key).ToLower()) return i; } return -1; } } }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からBindingList.FindCore メソッドを検索する場合は、下記のリンクをクリックしてください。

- BindingList.FindCore メソッドのページへのリンク