title: Weird type check results comparing UITextSelectionView to UIView
body: <p>I'm iterating through a <strong>UITextView</strong> using its SubViews-property. I then compare the found type with <strong>UIView</strong> using</p>
  
  <pre><code>if(element.GetType() != typeof(UIView))
  </code></pre>
  
  <p>For some weird reasons some subtype of <strong>UITextView</strong> for example <strong>UITextSelectionView</strong> evaluates to true.</p>
  
  <p>To my knowledge a derived class should evaluate to false - so what's happening here? </p>
  
  <p>In my case I got UIContainerView which is part of UITextView and iterating over it gives me a UITextSelectionView.</p>
  
  <p><a href="https://i.stack.imgur.com/SiORw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SiORw.png" alt="view (parent)"></a>
  <a href="https://i.stack.imgur.com/BVPtV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BVPtV.png" alt="element (child)"></a></p>
  
  <p>Both are shown with their respective types, but</p>
  
  <p><code>view.GetType().FullName</code> and <code>element.GetType().FullName</code> return for both <strong>UIView</strong>.</p>
  
  <p>The only way to check the type "for real" seems to cast it to object:</p>
  
  <pre><code>&gt; ((object)view).Class.Name "_UITextContainerView"
  
  &gt; ((object)element).Class.Name "UITextSelectionView"
  </code></pre>
  
  <p>Which - for me - isn't at all the same like using GetType() and typeof.</p>
  
  <p>Unfortunately there is no entry in UIKit-api of xamarin: <a href="https://developer.xamarin.com/api/type/UIKit.UIView/" rel="nofollow noreferrer">https://developer.xamarin.com/api/type/UIKit.UIView/</a></p>
  
  <p>I find it at apple dev neither: <a href="https://developer.apple.com/search/?q=UITextSelectionView" rel="nofollow noreferrer">https://developer.apple.com/search/?q=UITextSelectionView</a></p>
  
  <p>But i seemed to find a header-file here which shows that it derives as I thought : <a href="http://developer.limneos.net/?framework=UIKit.framework&amp;header=UITextSelectionView.h" rel="nofollow noreferrer">http://developer.limneos.net/?framework=UIKit.framework&amp;header=UITextSelectionView.h</a></p>