Having a hard time understanding how to add a custom interface as a member to one of my models #537
-
I'm new to Suppose I have this model:
Suppose I have this interface:
How can I add a new member to my model, called Only way I managed was either: Or: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The first way you used is valid.
if you want runtime type checking then an interface is not enough, you need to tell the runtime how it should be type checked (which is what types.object is actually doing) |
Beta Was this translation helpful? Give feedback.
The first way you used is valid.
A faster way to do it skipping the runtime type checking is:
if you want runtime type checking then an interface is not enough, you need to tell the runtime how it should be type checked (which is what types.object is actually doing)