|
|
|
Click here to copy the following block |
Function FilterByType(ByVal m As MemberInfo, ByVal filterCriteria As Object) As _ Boolean
If m.MemberType = MemberTypes.Property Then Dim pi As PropertyInfo = CType(m, PropertyInfo) Return (pi.PropertyType Is filterCriteria) ElseIf m.MemberType = MemberTypes.Method Then Dim mi As MethodInfo = CType(m, MethodInfo) Return (mi.ReturnType Is filterCriteria) End If End Function
Dim stringType As Type = Type.GetType("System.String") Dim minfos() As MemberInfo
Dim returnType As Type = Type.GetType("System.Int32")
minfos = stringType.FindMembers( MemberTypes.Method Or MemberTypes.Property, _ BindingFlags.Public Or BindingFlags.Instance, AddressOf FilterByType, _ returnType)
Dim mi As MemberInfo For Each mi In minfos Debug.WriteLine(mi.Name) Next
|
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|