I am tired of turning one html object into another. One way to do so would be to convert them to ihtmldomnode and then back

So here we go
vb.net Code:
  1. <Extension()>
  2.     Public Function convertTo(Of Somethingelse)(ByVal node As mshtml.IHTMLDOMNode) As Somethingelse
  3.         Return CType(node, Somethingelse)
  4.     End Function
  5.     <Extension()>
  6.     Public Function toNode(Of something)(ByVal someStuff As something) As mshtml.IHTMLDOMNode
  7.         Return CType(someStuff, mshtml.IHTMLDOMNode)
  8.     End Function
  9.     'Why Can't I do this
  10.     '<Extension()>
  11.     'Public Function CtypeReloaded(Of something, somethingelse)(ByVal someStuff As something) As somethingelse
  12.     '    Return CType(someStuff, somethingelse) 'Error  1   Value of type 'something' cannot be converted to 'somethingelse'.   \\work\c\business\fromwork\currentprojects\program\library\vb.net\internetAccessSupporter.vb    20  22  googlepages2
  13.     '    Return CType("", somethingelse)
  14.     'End Function
  15.  
  16. 'I like this one better
  17.     <Extension()>
  18.     Public Function CtypeNode(Of Something, Somethingelse)(ByVal someStuff As Something) As Somethingelse
  19.         Dim node = CType(someStuff, mshtml.IHTMLDOMNode) 'Error 1   Value of type 'something' cannot be converted to 'somethingelse'.   \\work\c\business\fromwork\currentprojects\program\library\vb.net\internetAccessSupporter.vb    20  22  googlepages2
  20.         Return CType(node, Somethingelse)
  21.         'For some reason   Return CType(someStuff, Somethingelse) direct doesn't work
  22.     End Function