Public Shared Function getListOfProperty(ByRef item As Object) As List(Of clsNameAndProperty)
Dim objLstOf As New List(Of clsNameAndProperty)Dim objNameAndProp As clsNameAndProperty
For Each p As System.Reflection.PropertyInfo In item.GetType().GetProperties()
If p.CanRead Then
objNameAndProp = New clsNameAndProperty
objNameAndProp.Name = p.Name
If p.GetValue(item, Nothing) Is Nothing Then
objNameAndProp.PropertyType = p.PropertyType
Else
objNameAndProp.PropertyType = p.GetValue(item, Nothing).GetType
End If
objNameAndProp.ExtNetModelType = MappingType(objNameAndProp.PropertyType)
objLstOf.Add(objNameAndProp)
End If
Next
Return objLstOf
End Function