Skip to content

Proscriptions & C# isms

Benjamin edited this page Mar 14, 2020 · 6 revisions

Proscriptions

What C# can't do that VB6 can

  • Optional ByRef
    • There is no equivalent in C#. There are ways you can try to work around this, such as overloaded function signatures, etc, but, in general, try to refactor away from this generally considered bad programming practice.
  • With
    • Convenient, but not supported by any language but VB6. In the majority of cases, a temp variable can be substituted, but in wider usage, the VB6 syntax allowed the use of this with functions that returned a value. This is harder to catch up to.
    • In general, try to refactor away from the use of With when you decide to convert to VB6. It's tempting to simply let the converter do it, but you wont be happy with the variable name choice anyway. You'll just have to refacgtor it manually in the end to make the variable names make sense. Use the linter to detect With usage in VB6.

Clone this wiki locally