When is obj.GetType().IsInstanceOfType(typeof(MyClass)) true?

后端 未结 5 941
终归单人心
终归单人心 2021-01-06 06:52

I\'m looking at this piece of code written by someone else, and I\'m wondering when it would evaluate to true. Basically, it is saying someType is an instance of someOtherT

5条回答
  •  余生分开走
    2021-01-06 07:43

    It is true when the object you call GetType() on is an instance of the System.Type object passed as an argument to the parameter of the IsInstanceOfType() method.

提交回复
热议问题