I have a class like below:-
public Class Student
{
string Name {get; set;}
int Age {get; set;}
Address studentAddres {get; set;}
}
public class Address
{
string Street{get; set;}
string City {get; set;}
}
Here Name and Age are System Define type and StudentAddres is custom type. How to differentiate between them using code.
I am using Reflection but not able to achieve.
It seems that you want to see either a value type or a string. Then you can use:
Type.IsPrimitive property