Using reflection loop through the class details and use the following condition -
type.IsValueType && !type.IsPrimitive && !type.Namespace.StartsWith("System") && !type.IsEnum
.
It should help you get a list of structs used in the class.
If you want an example on reflection, try
Accessing Attributes by Using Reflection[
^]. A similar approach is needed for reading other types as well.