title: Operator not defined for list of custom class
body: <p>I have created a custom class <code>Node</code> and have defined the <code>=</code> operator for it. </p>
  
  <p>However, upon attempting to use the <code>=</code> operator with a <code>List(Of Node)</code>, I have been told that the <code>=</code> operator is not defined for the <code>List(Of Node)</code>. I suppose I assumed that as I had defined the operator for the class that it would work similarly for a collection class. </p>
  
  <p>Anyway, I do not know how to go about defining the operator when it is an already existing collection such as a list and would appreciate some pointers in the right direction.
  Any help is much appreciated and I can provide code snippets if you would find it useful :)
  Thanks</p>
  
  <p>EDIT<br>
  Operators in class  </p>
  
  <pre><code>Public Shared Operator =(ByVal nodeA As Node, ByVal nodeB As Node) As Boolean 'Defining what the operators '=' and '&lt;&gt;' mean for this class and type
      If nodeA.xPos = nodeB.xPos And nodeA.yPos = nodeB.yPos Then 'Decided should be determined by whether they hold the same position in the grid
          Return True
      Else
          Return False
      End If
  End Operator
  
  Public Shared Operator &lt;&gt;(ByVal nodeA As Node, ByVal nodeB As Node) As Boolean
      If nodeA.xPos = nodeB.xPos And nodeA.yPos = nodeB.yPos Then
          Return False
      Else
          Return True
      End If
  End Operator
  </code></pre>
  
  <p>Where I have attempted to check if the list is null ...</p>
  
  <pre><code>If path = Nothing Then
  
  
  End If
  </code></pre>
  
  <p>... and got 'Operator '=' is not defined for types List(of Node) and List(of Node)</p>