title: Overload resolution failed because no accessible 'Item' can be called without a narrowing conversion
body: <p>So, i'm attempting to follow <a href="https://support.microsoft.com/en-us/kb/308063" rel="nofollow">this</a> guide to populate a treeview from XML Data in Visual Basic, but it throws the error:</p>
  
  <blockquote>
    <p>"Overload resolution failed because no accessible 'Item' can be
    called without a narrowing conversion:
        'Public Overridable ReadOnly Default Property Item(key As String) As System.Windows.Forms.TreeNode': Argument matching parameter 'key'
    narrows from 'Long' to 'String'.
        'Public Overridable Default Property Item(index As Integer) As System.Windows.Forms.TreeNode': Argument matching parameter 'index'
    narrows from 'Long' to 'Integer'."</p>
  </blockquote>
  
  <p>After some searching, I was told that setting Option Strict to "Off" would solve the error, but it has done no such thing. Does anyone have a solution to this error?</p>
  
  <p>Here is the code in question:</p>
  
  <pre><code> If inXmlNode.HasChildNodes() Then
       nodeList = inXmlNode.ChildNodes
       For i = 0 To nodeList.Count - 1
          xNode = inXmlNode.ChildNodes(i)
          inTreeNode.Nodes.Add(New TreeNode(xNode.Name))
          tNode = inTreeNode.Nodes(i)
          AddNode(xNode, tNode) //The code that throws the error.
       Next
    Else
       ' Here you need to pull the data from the XmlNode based on the
       ' type of node, whether attribute values are required, and so forth.
       inTreeNode.Text = (inXmlNode.OuterXml).Trim
    End If
  </code></pre>