示例#1
0
 /// <summary>
 /// Check if a bean can be viewed as a given target type.
 /// The result will be true if the Beans.getInstanceof method
 /// can be used on the given bean to obtain an object that
 /// represents the specified targetType type view.
 /// </summary>
 /// <param name="bean">  Bean from which we want to obtain a view. </param>
 /// <param name="targetType">  The type of view we'd like to get. </param>
 /// <returns> "true" if the given bean supports the given targetType.
 ///  </returns>
 public static bool IsInstanceOf(Object bean, Class targetType)
 {
     return(Introspector.IsSubclass(bean.GetType(), targetType));
 }