I think I made some progress here. Since it's the Fill method of the table adapter I'm having trouble turning into a variable, I tried to create a function property to use as the variable.
Private _SearchFunction As Func(Of DataTable, String, Integer)
Protected Property SearchFunction() As Func(Of DataTable, String, Integer)
Get
Return _SearchFunction
End Get
Set(ByVal value As Func(Of DataTable, String, Integer))
_SearchFunction = value
End Set
End Property
SearchFunction = Me.UspCustomerSearch_SelectTableAdapter.Fill(Me.TransactDataSet.uspCustomerSearch_Select, "%" & SearchToolStripTextBox.Text & "%")
This seems like it would work in theory but when I go to set the property in the last line of code, I get the error:
Error1Value of type 'Integer' cannot be converted to 'System.Func(Of System.Data.DataTable, String, Integer)'.
So, I think I'm on the right track but am not quite there yet. If I can figure out how to set this function into a property the rest should be easy.