I have a class with many properties with different types including some custom class types. Now I want to find those properties which are not of system types like :
System.Int32System.BooleanSystem.StringSystem.Decimaland so on
Currently I am doing things like this way :
Dim objProperties As PropertyInfo() = GetType(MyClassType).GetProperties()
For Each objPropertyInfo As PropertyInfo In objProperties
If Not objPropertyInfo.PropertyType() Is GetType(Int32) And Not objPropertyInfo.PropertyType() Is GetType(String) Then
'other code
End If
Next
If I can get the desired list, then the If condition could be more simple like :
If Not systemTypeList.Contains(objPropertyInfo.Name) Then