05-08-2023 10:47 PM
if father class and children class has a same type and same name parameter,how can I get father parameter by children class? who can show me an example?
05-09-2023 12:59 AM
Do you mean a private class data member? If it is that you would create a property accessor for the father private data value (the child value you can access directly but if you want to create a property accessor too, you would have to give it a different name.
However the whole thing sounds like a code smell. Why do they have to have the same name and why do you need them both in the child class? Either your child should overwrite it or it should have a different name.
05-09-2023 10:54 AM
@yanzhanglin wrote:
if father class and children class has a same type and same name parameter,how can I get father parameter by children class? who can show me an example?
Sounds like Call Parent (use QD) to me.
Call parent invokes the VI of the ancestor (parent, grand parent, etc.) class you're overwritten.
For instance, the child method "Get Text.vi" can call the parent "Get Text.vi" to extend the info:
This is not to be confused with invoking the same VI on a contained class of the same type. This could trigger a recurrent call, if the contained object is the same as the calling class.