how to identify that the attribute of an object is a class type? C # [closed]

0

I'm doing a method in c # where I traverse an object taking out its attributes, its properties and see the value of the properties, but some of these attributes are classes that in turn contain more properties, I must access them, to I am doing this method recursively, the problem is that I do not know how to identify these properties as classes, any ideas ???

    
asked by Carlos 21.09.2018 в 16:26
source

1 answer

2

you can validate it with the following code fragment:

 Type  myType = typeof(atributoValidar);

 myType.IsClass retorna verdadero o falso

I hope it serves you;)

    
answered by 21.09.2018 / 18:37
source