Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
400 views
in Technique[技术] by (71.8m points)

matlab - Check if a property exists nested inside a class

I have a class, in which there are several properties, and more nested inside. For example,

myinstrumentclass.myproperty1.nestedprop1.(...).nestedpropN.IPAddress, and here I would like to check if IPAddress exists somewhere inside myinstrumentclass, without needing to specify everything in between.

The idea is to be able to have a function that takes any myinstrumentclass1, myinstrumentclass2, ...etc., and check if the IPAddress property exists somewhere inside. Any clues on how I might be able to accomplish this?

Thanks for your time.

question from:https://stackoverflow.com/questions/65907657/check-if-a-property-exists-nested-inside-a-class

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...