Hello,
I am trying to create a function on a collection class that is inheriting from the CollectionBase class that allows searching for an object in the collection based on a user provided value and property name. The signature would look something like the following:
I know I could hard code in a select case statement to perform different searches for each possible propertyName value, but I would like to create something that is a little more dynamic.
Is there some way that I can do this using reflection or some other means?
Thanks,
stravis
I am trying to create a function on a collection class that is inheriting from the CollectionBase class that allows searching for an object in the collection based on a user provided value and property name. The signature would look something like the following:
Code:
Function IndexOf(byval value as Object, propertyName as String) as Integer
I know I could hard code in a select case statement to perform different searches for each possible propertyName value, but I would like to create something that is a little more dynamic.
Is there some way that I can do this using reflection or some other means?
Thanks,
stravis