goldengel
Member
- Joined
- Jan 4, 2010
- Messages
- 9
- Programming Experience
- 3-5
Hi.
I have no chance to simple search a property in my property list by using the ".Title" of the property. Instead of using "For each > If .Title = SearchTitle" I prefer to do it with the Predicate and ".Find" methode.
Can someone help me to find out, how to avoid using the local variable " _SearchProperty" in the example below?
I have no chance to simple search a property in my property list by using the ".Title" of the property. Instead of using "For each > If .Title = SearchTitle" I prefer to do it with the Predicate and ".Find" methode.
Can someone help me to find out, how to avoid using the local variable " _SearchProperty" in the example below?
VB.NET:
Private Sub NumericUpDownFrequency_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumericUpDownFrequency.ValueChanged
Dim PropFrequency As F_SCANT30_DEVICES.TB.Devices.clsFscanProperty
_SearchProperty = "Freqency"
PropFrequency = Me.cRemote.FscanProperties.Find(AddressOf CompareProperty)
End Sub
Private Function CompareProperty(ByVal Prop As F_SCANT30_DEVICES.TB.Devices.clsFscanProperty) As Boolean
If Prop.Title = Me._SearchProperty Then
Return True
Else
Return False
End If
End Function