Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将作为某个类的实例的影片剪辑添加到数组中(仅添加作为 BLAH 实例的影片剪辑)。我找不到任何引用影片剪辑类的属性。任何人都可以帮忙吗?
使用is运算符:
is
if( mc is BLAH){ // here you are }
来自文档:
评估对象是否与特定数据类型、类或接口兼容