Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
    Dim wb As WebBrowser    
    Set wb = New WebBrowser
    
    Dim v As Variant    
    v = wb.Document.All("ID").innerText

The initial C# translation of the complex expression is:

    v = ((object)((dynamic)wb.Document).All("ID").innerText());
    

The presence of dynamic here indicates the tool was not able to fully resolve the expression. The code builds, but it may lead to runtime problems during testing.

Analysis and Migration

...

Rulese

The first weak link in the expression is WebBrowser.Document. This property is weakly typed in COM:

...